Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we add link_to with a div in rails?

I want to add link_to with a

<div class="panel-body"> 

it should be something like this

<%= link_to 'div',{:controller=>'users',:action=>'go'} 

but I am not able to find any way.

This is my div:

<div class="panel-body"></div>
<div class="panel-footer back-footer pink">
  workers signup
</div>
like image 581
Peace Avatar asked Jun 04 '15 09:06

Peace


1 Answers

You can put a div inside of link_to:

<%= link_to users_path, :action => 'go' do %>
    <div>YOUR CONTENT</div>
<% end %>
like image 156
thebenedict Avatar answered Sep 19 '22 12:09

thebenedict