Rails 3を使用していて、 permalink-fuプラグインをダウンロードしました(Rails 2.3.8に問題なくインストールして数回使用しました)が、モデルの[新規]ビューまたは[表示]ビューに移動すると(これはリストと呼ばれます)、次のエラーが発生します:
undefined method `evaluate_attribute_method' for #<Class:0xb57ede88>
has_permalink :title
モデルから行を削除してもこれは発生しませんList
が、プラグインが機能するために必要です。
私のモデルは次のようになります。
class List < ActiveRecord::Base
has_permalink :title
def to_param
permalink
end
end
私のコントローラーは次のようになります。
def show
@list = List.find_by_title(params[:permalink])
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @list }
end
end
# GET /lists/new
# GET /lists/new.xml
def new
@list = List.new
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @list }
end
end
私のルートファイルは次のようになります。
match '/:permalink' => 'lists#show', :as => :list
誰かが私に何が悪いのか教えてもらえますか?