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
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 D. [email protected] wrote:
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 D.
http://atomgiant.com
http://gifthat.com