This the same as http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1692-setting-a-decimal-from-00-to-doesnt-constitute-a-change which should be applied soon.
Fred On 14 Jan 2009, at 03:52, stack wrote: > > If you build a form to edit a model that has a decimal, you cannot > blank out the value if it was originally 0.0. There is an exception > for this for integers, just not decimals. > > On Jan 13, 8:42 pm, "Mislav Marohnić" <[email protected]> > wrote: >> Isn't this expected behavior?"".to_i == 0.0 #=> true >> >> You are saying that assigning an empty string should nulify the >> value? >> >> >> >> On Wed, Jan 14, 2009 at 02:17, stack <[email protected]> wrote: >> >>> If a model has a decimal value which is currently set to 0.0 and the >>> field is blanked out with an empty string (like when submitting an >>> empty text_field for the value), the dirty objects code does not >>> recognize a change. >> >>> http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/17 >>> ... > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
