2006/3/5, Michael Koziarski <[EMAIL PROTECTED]>: > See > http://dev.rubyonrails.org/browser/trunk/activerecord/lib/active_record/base.rb#L1561 > > if you implement your own _before_type_cast methods you should be > fine. Why not just define a separate accessor though, i.e. one > used during calculations but not during user input?
I WANT the value to be displayed as 7.50, not 750 ! #***_before_type_cast returns the latter, which is incorrect from the user's point of view. He really typed 7.5, but the value is stored as 750, to ensure floating point values are not modified along the way. So, if I override tax_rate_before_type_cast, I should be all right ? I'll test this out. Thanks for the info, Michael. Bye ! -- François Beausoleil http://blog.teksol.info/
_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core