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

Attributes don't play nicely with ActiveModel::Dirty in Rails 6 #529

Open
edtjones opened this issue Sep 20, 2019 · 0 comments
Open

Attributes don't play nicely with ActiveModel::Dirty in Rails 6 #529

edtjones opened this issue Sep 20, 2019 · 0 comments

Comments

@edtjones
Copy link
Collaborator

We've hit a problem on a project where the functionality of ActiveModel::Dirty has changed, such that the following no longer works for a Her-backed model:

foo = SomeModel.find(1)
foo.title # returns a string
foo.title = 'bar'
foo.restore_title! #should restore the title; actually fails because foo.title is a String and Rails 6 expects it to respond to `original_value`.

Haven't done enough digging to determine the best course of action for fixing, yet.

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

No branches or pull requests

1 participant