[Rails] add confirmable to devise
Rails3.1.3
devise (2.0.4)
I have set up a table: users using devise. But it gives an error
undefined local variable or method `unconfirmed_email' for
#<User:0x00000102231218>
So I generated migration file and edited
class AddConfirmableToDevise < ActiveRecord::Migration
def change
change_table(:users) do |t|
t.confirmable
end
end
end
$rake db:migrate
command produces
== AddConfirmableToDevise: migrating
-- change_table(:users)
[DEVISE] You are using t.database_authenticatable and others in your
migration and this feature is d
eprecated. Please simply use Rails helpers instead as mentioned here:
https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0-migration-schema-style
rake aborted!
An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: duplicate column name: confirmation_token: ALTER
TABLE "users" ADD "confirmat
ion_token" varchar(255)
--------------------------
So I went to the page,
https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0-migration-schema-style
But I am not sure how to edit the migration file accordingly.
Could anyone help me out?
soichi
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home