Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. @user = User.new(:email => 'test@example.com', :password => 'password', :password_confirmation => 'password')
  2. @user.save
  3.  
  4. @user = User.new(:email => 'test@example.com',
  5. :password => 'password',
  6. :password_confirmation => 'password')
  7. # This will save the user in db with fields for devise
  8. sign_in @user
  9. # :bypass is set to ignore devise related callbacks and only save the
  10. # user into session.
  11. sign_in @user, :bypass => true
  12.  
  13. config/routes.rb
  14.  
  15. devise_for :users
  16.  
  17. devise_for :users, :path_prefix =>'auth'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement