Ruby on Rails Friday, May 28, 2010

On May 28, 12:11 pm, andrew v <andrew....@gmail.com> wrote:
> Hi,
>
> I have implemented restful authentication plugin in my rails application.
> It's a barebones implementation without activation, forget password features
> ...etc. I was wondering if it is possible to reset a User's password from
> the rails console? As things stand now, there is no other way to reset their
> passwords :).
>

Haven't used restful auth in a long long time, but you should be able
to do exactly what a controller would do when setting a password:

user.password = 'imAdummy'
user.password_confirmation = 'imAdummy'
user.save!

Fred

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment