Ruby on Rails
Monday, May 18, 2015
Thanks! That worked perfectly!!
-- -joe
On Monday, May 18, 2015 at 5:54:28 PM UTC-7, jmcguckin wrote:
On Monday, May 18, 2015 at 5:54:28 PM UTC-7, jmcguckin wrote:
Rather than setting the <meta name="description" contents="xyzzy"> tag in every webpage of my site, I decided to be clever and set a variable in each controller with the text anddo:<meta name="description" contents=<%= @desc %> />on the layout instead. The problem is that the generated text has a no quotes:<meta name="description" contents=FOO BAR/>is what I end up with.I've tried every variant of surrounding the text with quotes or using variable interpolation in strings to try to make this work.Either I end up with no text passed into the layout, or I get<meta name="description" contents="FOO BAR"/>Which may actually be correct, but just looks odd.I've actually decided to add the meta tag the old fashioned way, but now I'm curious as to why I can't make this work.Any ideas?Thanks,Joe
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5ed215ca-ae09-44be-a826-9d378c3e1b57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment