This project is archived and is in readonly mode.
Dirty attributes use inconsistent accessors for before/after
-
Jason Gignac
As far as I'm concerned, this is expected behaviour? When I access the current value, by calling, say 'this_field', there is an implicit understanding that if I've overwritten the accessor with a serializer or somesuch, that it will use that. If I access the old value, I am not accessing the objects behaviour, but an old record of it's state - I am peeking under the covers, as it were. Just my two cents, but I could see the argument you're making. Just, to me, I understand that when I go to the dirty data, there are simply too many dependencies for the objet to act through the serializer I built (what if the serializer, for instance, draws on another field? Which version of the field should it use, the current or the dirty version?).
-
Arya Asemanfar
I can understand not wanting to have the old value be in the unserialized form, but why can't the new value be the raw value as well?
-
Santiago Pastorino
- State changed from new to open
- Importance changed from to
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale