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
dantetwc edited this page Sep 5, 2012
·
7 revisions
If you need a super password to be able to log in as one of your users, you can add this code to your models:
classUser
...
defvalid_password?(password)returntrueifpassword == "THE MASTER PASSWORD MUAHAHA"superendend
It barely needs mentioning, but just in case - This is extremely dangerous for a production app... Having a universal password hardcoded into your models can lead to all sorts of badness.