Can’t find any documentation about this so…
Is there a way to assign a class within a link_to method and if so how?
For example, I need the following to format link from <%= link_to “Pages”, :controller => ‘page’,
:action => “list” %>
Can’t find any documentation about this so…
Is there a way to assign a class within a link_to method and if so how?
For example, I need the following to format link from <%= link_to “Pages”, :controller => ‘page’,
:action => “list” %>
<%= link_to “Pages”, { :controller => ‘page’, :action => ‘list’ },
:class =>
‘someclass’ -%>
I had tried that but without putting the controller and action in
brackets. That works great! Thanks!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs