私はRails 3を使用しています。hereが重複している可能性があります。しかし、それは私の問題を解決しなかったし、他の解決策もしなかった。私はUser
モデルにdevise :confirmable
を追加したん未定義のローカル変数またはメソッド `confirmed_at 'for#ユーザ
class AddConfirmableToDevise < ActiveRecord::Migration
def change
change_table(:users) do |t|
t.confirmable
end
add_index :users, :confirmation_token, :unique => true
end
end
を次のように
私の移行があります。
私のrake db:migrate
は出力しません。そして私の看板アップページがエラーを与える:
undefined local variable or method 'confirmed_at' for #User
誰もが手掛かりを持っていますか?
あなたが知っておくべきこと開発者のマイグレーションヘルパー( 't.confirmable'のような)は廃止されました。バージョン2.0。これからは、[列を手動で追加する](https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0-migration-schema-style) –