嗨,我有rails應用程序。當我打電話給家庭控制器時,我有索引操作。在index.html.erb .i中有一些link_to_remote鏈接。突出顯示link_to_remote鏈接
<li><%=link_to_remote "Example",
:update =>'view',
:url =>{:controller => 'home',:action => 'bank'},
:method => :post,
:html =>{:id =>"cb"},
:with => "'choose=' +encodeURIComponent('value')" %></li>
<li><%=link_to_remote "Test",
:update =>'view',
:url =>{:controller => 'home',:action => 'bank'},
:method => :post,
:html => { :id =>'cb1'},
:with => "'choose=' +encodeURIComponent('value')" %></li>
點擊「示例」和「測試」選項各自的div得到了更新之後....我想強調用戶點擊後的選項發生的事兒,認爲如果「示例」點擊我要強調「示例」選項背景...
我試過current_page? rail helper方法,:complete
link_to_remote
的屬性,但沒有運氣,任何人都可以在此建議我。 ...在此先感謝
是如果我使用PARAMS [:行動]意味着它返回 「指數」 行動,而不是隻有當前的行動... – palani 2010-04-14 12:13:08