私はRailsにかなり慣れていないので、メソッドをActiveViewクラスに追加して、パーシャルから新しいメソッドにアクセスできるようにする方法を見つけようとしています。
サンプルコードは次のとおりです。
%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 にその存在を認識させるのに苦労しています。
ありがとう。