[Rails-core] Re: [PATCH] Setting a decimal from 0.0 to '' doesn't constitute a change

2009-01-14 Thread Frederick Cheung
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 > bla

[Rails-core] Re: [PATCH] Setting a decimal from 0.0 to '' doesn't constitute a change

2009-01-13 Thread stack
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ć" wrote: > Isn't this expected behavior?"".to_i == 0.0  #=> true > > You are sayin

[Rails-core] Re: [PATCH] Setting a decimal from 0.0 to '' doesn't constitute a change

2009-01-13 Thread Mislav Marohnić
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 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 wh