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
Eugene Burmakin edited this page Jan 1, 2017
·
2 revisions
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.find(params[:id]), scope: :user)
Of course you could also just pass in a predefined User object.