railsでdeviseを使いメール認証を実装しようとしているのですが、
Sign_up時に以下のエラーメッセージが発生しました。
undefined local variable or method `confirmed_at' for #User:**************** Did you mean? confirmed?
rails
1models/user.rb 2 3class User < ApplicationRecord 4 # Include default devise modules. Others available are: 5 # :confirmable, :lockable, :timeoutable and :omniauthable 6 devise :database_authenticatable, 7 :registerable, 8 :confirmable, 9 :recoverable, 10 :rememberable, 11 :trackable, 12 :validatable 13end 14
rails
1*****_devise_create_users.rb 2 3class DeviseCreateUsers < ActiveRecord::Migration[5.1] 4 def change 5 create_table :users do |t| 6 ## Database authenticatable 7 t.string :email, null: false, default: "" 8 t.string :encrypted_password, null: false, default: "" 9 10 ## Recoverable 11 t.string :reset_password_token 12 t.datetime :reset_password_sent_at 13 14 ## Rememberable 15 t.datetime :remember_created_at 16 17 ## Trackable 18 t.integer :sign_in_count, default: 0, null: false 19 t.datetime :current_sign_in_at 20 t.datetime :last_sign_in_at 21 t.string :current_sign_in_ip 22 t.string :last_sign_in_ip 23 24 ## Confirmable 25 t.string :confirmation_token 26 t.datetime :confirmed_at 27 t.datetime :confirmation_sent_at 28 t.string :unconfirmed_email # Only if using reconfirmable 29 30 31 t.timestamps null: false 32 end 33 34 add_index :users, :email, unique: true 35 add_index :users, :reset_password_token, unique: true 36 add_index :users, :confirmation_token, unique: true 37 end 38end 39
migrateも行っております。
調べてみたのですがcomfirmableのコメントアウトばかりでなかなか解決の糸口がつかめません...
どなたか教えて頂けないでしょうか...
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。