Peace
Peace

Reputation: 626

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>

Upvotes: 7

Views: 8123

Answers (1)

thebenedict
thebenedict

Reputation: 2589

You can put a div inside of link_to:

<%= link_to users_path, :action => 'go' do %>
    <div>YOUR CONTENT</div>
<% end %>

Upvotes: 24

Related Questions