html - if statement syntax error when attempting to embed meta tag -


<%= if @meta_leeds == "leeds" %>   <meta property="og:image" content="http://www.some.link/to/image"/> <% end %> 

i want embed specific meta tag on 1 page of rails application. defined :

@meta_leeds = "leeds" 

in pages' controller , display string when put between h1 tag not output meta tag based on outcome of above if statement.

what doing wrong?

<% if @meta_leeds == "leeds" %>   <meta property="og:image" content="http://www.some.link/to/image"/> <% end %> 

just remove = (and =) statement.


Comments