Reputation: 1477
Using Meta-Tags gem, in my blog post show page this piece of code prints the code itself instead of showing its value, which is the blog post title!
<% title '#{@blog_post.title}' %>
What's wrong with it? Seems like such easy problem but haven't come up with a solution yet!
Upvotes: 0
Views: 210
Reputation: 6438
If you need to have ruby interpolation, then you need to use double quotes, not single quotes.
Try changing this:
<% title '#{@blog_post.title}' %>
to this:
<% title "#{@blog_post.title}" %>
Then it should work.
Upvotes: 1