Marshrutga yoki yo'lga div bilan bog'lanishni bosish (Rails 3)

I understand how to make a div click-able to a specific URL (i.e. "http://example.com"), and am searching for a way to make an entire div click-able, linking to a specific path (i.e. user_path(user), :remote => true).

1

2 javoblar

Javob:

<%= link_to user_path(user), :remote => true do %>
<div class="divname"></div>
<% end %>
1
qo'shib qo'ydi

Bu asosiy javob:

1-asosiy kalit bilan foydalanuvchini ko`rish uchun havolani "/ users/1" ga o'xshash qiling.

0
qo'shib qo'ydi