This project is archived and is in readonly mode.
[PATCH] Dirty objects shouldn't track changes when a nullable numeric field is assigned a blank value
-
ckozus
- Tag set to activerecord, bug, edge, patch
- Title changed from Dirty objects shouldn't track changes when a nullable numeric field is assigned a blank value to [PATCH] Dirty objects shouldn't track changes when a nullable numeric field is assigned a blank value
-
Frederick Cheung
Seems reasonable to me, however I suggest that you change the condition to ready
column.number?rather than
[:integer, :decimal, :float].include?(column.type) -
ckozus
Thanks for the tip Frederick! I wasn't aware of the number? method.
I'm attaching a simpler patch.
-
Repository
- State changed from new to committed
(from [9606bc883292102faaff0e3046855521d36131ef]) Fixing bug on ActiveRecord::Dirty#field_changed? for nullable numeric columns, NULL gets stored in database for blank (i.e. '') values. Only integer columns were considered.
Signed-off-by: Michael Koziarski michael@koziarski.com [#1692 [PATCH] Dirty objects shouldn't track changes when a nullable numeric field i... state:committed] http://github.com/rails/rails/co...
-
Repository
(from [c891d685de9a729332836751c1293770b86a1b52]) Fixing bug on ActiveRecord::Dirty#field_changed? for nullable numeric columns, NULL gets stored in database for blank (i.e. '') values. Only integer columns were considered.
Signed-off-by: Michael Koziarski michael@koziarski.com [#1692 [PATCH] Dirty objects shouldn't track changes when a nullable numeric field i... state:committed] http://github.com/rails/rails/co...
-
Repository
- State changed from committed to resolved
(from [5ed119c005864b586a259e9d8def5f7aef8a4e54]) Fix dirty handling of nullable non-integer numeric columns [#1692 [PATCH] Dirty objects shouldn't track changes when a nullable numeric field i... state:resolved]
Signed-off-by: Frederick Cheung frederick.cheung@gmail.com http://github.com/rails/rails/co...
