ruby on rails 4 - How can I write this link_to code? -


rails 4.2 i'm trying write following navigation menu it's not working:

<a href="#" rel="ddsubmenu2" class="bred"> <i class="fa fa-users"></i> about</a> 

i've tried following:

<%= link_to "home", root_url, rel: "ddsubmenu2", class: "blightblue", {i-class: "fa fa-home"}  %> 

and

<%= link_to "home", root_url, rel: "ddsubmenu2", class: "blightblue", i_class: "fa fa-home"  %> 

and

<%= link_to "home", root_url, rel: "ddsubmenu2", class: "blightblue", iclass: "fa fa-home"  %> 

none of work. can't find examples of 'i class'. ideas?

use block.

<%= link_to root_url, rel: 'ddsubmenu2', class: 'blightblue' %>   <i class="fa fa-users"></i> <% end %> 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -