wboezq
Last Updated: February 25, 2016
·
787
· sapienza
1a7d3a0b9343d86b263fed05b1ae950d

Custom link_to in Rails

You now that is possible pass a block to a link_to method? :)

Sometimes we need custom html markup inside our links, and here's the easiest way to it with rails routes:

<%= link_to destroy_user_session_path, class: "logout-link" do %>
  logout <i class="icon-off"></i>  
<% end %>
Say Thanks
Respond