> There must have been some reason for this behavior.

validates_numericality_of

if you have an integer field, and the user types in "a12345" instead
of "12345".  When displaying error messages you want to display the
value before it was typecast, otherwise it'd just be set to 0.  So the
field helper doesn't look directly in the database, it uses
price_before_type_cast, if it exists.

So the behaviour is intentional, if somewhat opaque.   Perhaps what's
needed is a way to make it easier to wrap attributes with custom
accessors and mutators?
-- 
Cheers

Koz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to