Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Dirty doesn't track integers changing from 0 to null

#433

I've just noticed that when editing numeric fields, and changing the value from 0 to '', the alteration isn't saved. I think it's a bug in dirty...

>> l = Lookup.first

=> #<Lookup id: 1, field_name: "yn", option_number: 0, option_description: "No", created_by: 1, updated_by: 1, created_at: "2007-08-23 15:15:42", updated_at: "2007-08-23 15:15:42">

>> l.option_number = ''

=> ""

>> l.changed?

=> false

>> l.changes

=> {}

Reported by Tim Chater · June 17th, 2008 @ 09:16 AM

State: resolved
Milestone: 2.1.1
Assigned to: Jeremy Kemper Jeremy Kemper
Importance: none

Activity

  1. Tim Chater
  2. Tim Chater
  3. Pratik
    Pratik
    • Tag set to 2.1, activerecord, bug, dirty, patch, tested
    • Assigned user set to Jeremy Kemper

    June 27th, 2008 @ 04:14 PM

  4. Jeremy Kemper
    Jeremy Kemper
    • State changed from new to open
    • Milestone set to 2.1.1

    June 28th, 2008 @ 03:23 AM

  5. Repository
    Repository
    • State changed from open to resolved

    (from [692e5954770bb3ed863e11463a7c09c7bbb422e9]) Dirty: recognize when an integer changes from zero to blank. [#433 state:resolved]

    http://github.com/rails/rails/co...

    June 28th, 2008 @ 05:34 AM

  6. Repository
    Repository

    (from [1415df8f49a19d469b9e2c15785db32eb312c000]) Dirty: recognize when an integer changes from zero to blank. [#433 state:resolved]

    http://github.com/rails/rails/co...

    June 28th, 2008 @ 05:35 AM

  7. Jeff Kreeftmeijer
    Jeff Kreeftmeijer
    • Tag cleared.

    Automatic cleanup of spam.

    November 8th, 2010 @ 08:21 AM