Actually, it is not broken. It turned out that WhitespaceKiller
(which sets model attributes to nil if they are empty) was not working
on edge. I did not dig into why it did not work, I just replaced the
:if => :email calls with :if => Proc.new {|u| !u.email.blank?}
Tom
On 11/3/06, Tom Davies <atomgiant-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I just noticed that my :on and :if conditions on my validations do not
> appear to be working in edge. For instance:
>
> validates_presence_of :password, :on => :create
>
> will validate even on update. And this:
>
> validates_uniqueness_of :email, :if => :email
>
> will validate :email even if it is empty.
>
> This was working in 1.1.6 and prior. Can anyone verify this bug in
> edge? If so, I can digg in a bit further.
>
> Thanks,
> Tom
>
> http://atomgiant.com
> http://gifthat.com
>
--
Tom Davies
http://atomgiant.com
http://gifthat.com
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---