0

I'm working around the erb template and couldn't get the following code working. I've tried to remove the quotes around the nested tag, but no luck. I'm using Rails 4.0.

<%= image_tag("<%= project.image_path%>", alt: "project") %>

Error:

_project.html.erb:1: syntax error, unexpected '>'...e_append='", alt: "project") %>';@output_buffer.to_s

Thanks for help.

1 Answer 1

3

You are still in a rails function

<%= image_tag( project.image_path, alt: "project") %>

should work

Sign up to request clarification or add additional context in comments.

1 Comment

Great! Thanks for fast response.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.