Ruby on Rails Monday, May 28, 2012

This does not work with has_secure_password because this module
automatically adds this validation:
validates_presence_of :password_digest

so no matter how you change the condition of validation in your own
model it just doesnt work. The solution I can think of is to write
your own has_secure_password module, you can copy a lot code from the
original from rails. Or use devise instead.


On Apr 5, 6:27 pm, YogiZoli <zoltanp.g...@gmail.com> wrote:
> Hi,
>
> I haven't tried it but would go for this:http://guides.rubyonrails.org/active_record_validations_callbacks.htm...
>
> You probably didn't used right conditions. To figure it out I always
> use Rails console. Create 2 users, a FB and a nonFB and try them out.
>
> On Apr 3, 7:57 pm, IAmNan <dger...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Did you ever get a solution to this? My app also allows authentication
> > outside without the password.
>
> > On Feb 15, 9:23 pm, David M <idav...@gmail.com> wrote:
>
> > > Yes, I already watched those screencasts, but I still don't know how to do
> > > it.

--
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