18
I am using Devise for authentication, and when someone visits a specific URL (with specific params in the URL), I would like to set the 'current_user' to a specific value from the db.
How do I do that ?
Also, will I have to make sure all the validation requirements are satisfied ? E.g., my user model has:
validates_presence_of :username, :email
If I set the current_user, would I have to set both the :username & :email, or can I just do one or the other ?