Help!  Stupid mistakee.... Reset database and now can't create a new
admin user!

Have seed file but get error now that using rails 4 ..  Any guidance
would be appreciated as I can't even log in as admin anymore.  Upgraded
to rails 4 and using Devise.

rake db:seed add the users to the table:

puts 'CREATING ROLES'
Role.create([
  { :name => 'admin' },
  { :name => 'user' },
  { :name => 'VIP' }
], :without_protection => true)
puts 'SETTING UP DEFAULT USER LOGIN'
user = User.create! :name => 'First User', :email => '[email protected]',
:password => 'please', :password_confirmation => 'please'
puts 'New user created: ' << user.name
user2 = User.create! :name => 'Second User', :email =>
'[email protected]', :password => 'please', :password_confirmation =>
'please'
puts 'New user created: ' << user2.name
user.add_role :admin
user2.add_role :VIP

Can't log in with the user names and passwords ain the table and get
error:
ActionController::InvalidAuthenticityToken in
Devise::SessionsController#create
ActionController::InvalidAuthenticityToken

Thanks,
Dave Castellano

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/f408ff6d293be9953db1a51fab1669e6%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to