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 => 'user@example.com', :password => 'please', :password_confirmation => 'please' puts 'New user created: ' << user.name user2 = User.create! :name => 'Second User', :email => 'user2@example.com', :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