我可以使用link_to clickable作为整个div而不是只点击¨Boekennaarafas?
就像此时如果你点击¨boekennaarafas¨那么link_to会做点什么。 我想把它放在div而不是文本上。所以当你点击div然后它会触发'update_bookkeeping_claims_claim_manager_path(@claim_manager),方法:'post'¨
.col-sm-6.col-md-5.col-lg-3.item.ibox-title.import{:onclick => "move()"}
.box.boxBatenmanager
.boxInsite.boxTop
%i.fa.fa-exchange.icon.iconApps
%h3.name
Baten boeken naar #{@claim_manager.bookkeeping_name || 'AFAS'} do
%br/
%h4.description
Uw heeft #{@claim_manager.claims.scheduled_to_update_bookkeeping.count} baten
(#{@claim_manager.institution_claim_mutations.scheduled_to_update_bookkeeping.count} mutaties) aangemerkt om te boeken.
= link_to "Boeken naar AFAS", update_bookkeeping_claims_claim_manager_path(@claim_manager), method: 'post'
%br/
答案 0 :(得分:4)
You can pass a block而不是link_to
帮助器的文本标签,它允许您将整个标记嵌套在链接中:
= link_to update_bookkeeping_claims_claim_manager_path(@claim_manager), method: 'post' do
.col-sm-6.col-md-5.col-lg-3.item.ibox-title.import{:onclick => "move()"}
[...]