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

Update logic to incorporate changes in ActiveModel::Dirty in Rails 5.2 #273

Merged
merged 5 commits into from
Dec 20, 2021
Merged

Update logic to incorporate changes in ActiveModel::Dirty in Rails 5.2 #273

merged 5 commits into from
Dec 20, 2021

Conversation

murugan-r
Copy link
Contributor

@murugan-r murugan-r commented Dec 17, 2021

In Rails 5, Activemode::Dirty behaviour has changed for _changed?, _was in before callbacks.
For reference: rails/rails#25337

Copy link
Collaborator

@excid3 excid3 left a comment

Choose a reason for hiding this comment

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

Thanks for this @murugan-r.

lib/acts_as_tenant/model_extensions.rb Outdated Show resolved Hide resolved
@excid3
Copy link
Collaborator

excid3 commented Dec 17, 2021

I just ran your test against the codebase without your code changes and it passes, so it looks like we're already fine with Rails 5.2+.

Did you have a test that failed against the current implementation?

@murugan-r
Copy link
Contributor Author

I just ran your test against the codebase without your code changes and it passes, so it looks like we're already fine with Rails 5.2+.

Did you have a test that failed against the current implementation?

@excid3 I do not have a test which fail against the current implementation due to both methods behave similarly in this situation. These new method are more intuitive and brings more clarity while reading code.

@excid3
Copy link
Collaborator

excid3 commented Dec 20, 2021

Okay, I thought your PR description was saying that it wasn't working properly with Rails 5.2.

@excid3 excid3 merged commit f7402b9 into ErwinM:master Dec 20, 2021
@murugan-r murugan-r deleted the activemodel-dirty-changes-rails52 branch December 20, 2021 01:58
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.

2 participants