Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove most code related to serialized properties #15435

Merged
merged 1 commit into from
Jun 1, 2014

Conversation

sgrif
Copy link
Contributor

@sgrif sgrif commented May 30, 2014

Nearly completely implemented in terms of custom properties.
_before_type_cast now stores the raw serialized string consistently,
which removes the need to keep track of "state". The following is now
consistently true:

  • model.serialized == model.reload.serialized
  • A model can be dumped and loaded infinitely without changing
  • A model can be saved and reloaded infinitely without changing

@sgrif
Copy link
Contributor Author

sgrif commented May 30, 2014

This depends on the changes from #15432 and #15434

topic = Topic.new(:content => "string")
assert_raise(ActiveRecord::SerializationTypeMismatch) { topic.save }
assert_raise(ActiveRecord::SerializationTypeMismatch) do
topic = Topic.new(:content => "string")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use 1.9 hash syntax?

Nearly completely implemented in terms of custom properties.
`_before_type_cast` now stores the raw serialized string consistently,
which removes the need to keep track of "state". The following is now
consistently true:

- `model.serialized == model.reload.serialized`
- A model can be dumped and loaded infinitely without changing
- A model can be saved and reloaded infinitely without changing
senny added a commit that referenced this pull request Jun 1, 2014
Remove most code related to serialized properties
@senny senny merged commit 02ee081 into rails:master Jun 1, 2014
@senny
Copy link
Member

senny commented Jun 1, 2014

awesome 💛 💚 ❤️ 💜 💙

@sgrif sgrif deleted the sg-rm-serialization branch March 14, 2018 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants