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

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -