0
我對Rails相當陌生,想弄清楚如何將方法添加到ActiveView類,以便我可以從諧音。Rails部分:在我的部分中找不到引用新方法的地方
下面是一些示例代碼:
%li
=link_to "#{h aim_small.description.shorten} #{"(current aim)" if aim_small.description == current_aim.description}", :action => 'show', :id => aim_small
.options
=link_to "edit", :controller => 'aims', :action => 'edit', :id => aim_small
=link_to "remove", :controller => 'aims', :action => 'destroy', :id => aim_small
我希望能夠調用current_aim方法在上面的部分,但我有麻煩的Ruby承認它的存在。
謝謝。