On 6/24/05, PJ Hyett <pjhyett-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Example:
> @user.password = @params[:user][:password]
> @user.password_confirmation = @params[:user][:password_confirmation]
These two lines can be simplified to:
@user.attributes= @params[:user]
> ignores this from the User model:
>
> validates_confirmation_of :password
> validates_length_of :password, :within => 4..40
>
> Wouldn''t it make sense that objects should still try and validate
on
> updates, not just saves?
They do, at least for me, which I find really annoying as there are
lots of cases when I''m updating a user and I haven''t changed
their
password. So I don''t use validates_confirmation_of very often.
Are you sure you haven''t specified an :on=>:create ?
--
Cheers
Koz