I'm having an issue getting this embedded Ruby to work:
<%= image_tag "svg/illustrations/non-standard-hero-shape.svg", class: "js-svg-injector", data: {
img_paths: '[
{"targetId": "#SVGNonStandardHeroShapeImg1", "newPath": "<%= image_path(\'cover-photo.jpg\') %>"},
{"targetId": "#SVGNonStandardHeroShapeImg2", "newPath": "<%= image_path(\'cover-photo.jpg\') %>"}
]',
parent: "#SVGNonStandardHeroShape" } %>
There's an issue with the two calls to
<%= image_path(\'cover-photo.jpg\') %>
The errors are:
syntax error, unexpected tIDENTIFIER, expecting '}'
syntax error, unexpected ']', expecting ')'
I'd highly recommend building this data as a pure ruby object, and then encoding it as JSON. Then you don't have to worry about all the
<%=tags so much.