You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
betternow edited this page Jun 5, 2011
·
1 revision
Often (like, when creating users as part of another controllers create method) you want to sign in the user from a controller. This is how it is accomplished:
sign_in(:user, User.find(params[:id]))
Of course you could also just pass in a predefined User object.