Could anyone advise how to set out the following link_to please, i thought that any html option ( and that includes a class doesnt it?) should be in {}...
So i have this link_to at the moment
<%= link_to(@portfolio.previous_post) if @portfolio.previous_post %>
I would like to add a class of 'prev' as this has a background image within the css, rather than using text..I am unsure on where to put
:class => 'prev' or class: 'prev'
depending on preference of course
This doesn't work
<%= link_to(@portfolio.previous_post, { class: 'prev'}) if @portfolio.previous_post %>
Any help appreciated