O_o why not? Is not this the whole point of a presence validation?

Sent using mobile Gmail
On Feb 6, 2014 2:35 AM, "Godfrey Chan" <notifications@github.com> wrote:

> In activemodel/lib/active_model/secure_password.rb:
>
> >            validates_presence_of     :password, :on => :create
> > -          validates_presence_of     :password_confirmation, if: lambda { |m| m.password.present? }
> > +          validates_presence_of     :password_confirmation, if: :should_confirm_password?
>
> Actually - nvm, they are both necessary - checking that
> password_confirmation is not nil fixes the particular bug you are
> referring to (when password_confirmation is nil it should not check for
> its presence).
>
> See, this stuff is hard :P
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/rails/rails/pull/13955/files#r9489961>
> .
>