How to Change a User's Password on a Development Machine

From Expertiza_Wiki
Revision as of 22:23, 18 April 2013 by Ajkofink (talk | contribs) (Created page with "The following commands change the 'admin' user's password when entered into the rails console. The rails console can be entered with the command <pre>./script/console</pre> while...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The following commands change the 'admin' user's password when entered into the rails console.

The rails console can be entered with the command

./script/console

while in the Expertiza working directory.

u = User.find_by_name('admin')
u.clear_password = 'new_password'
u.clear_password_confirmation = 'new_password'
u.save
exit