Rather than setting the tag
every webpage of my site, I decided to be clever and set a variable in
controller with the text and
<meta name="description" contents=<%= @desc %> />
on the layout instead. The problem is that the generated text has a no
<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.