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

Restrict set_attribute_was patch to Rails versions >= 5.2, < 6 #1

Merged
merged 1 commit into from Nov 3, 2022

Conversation

skarger
Copy link

@skarger skarger commented Nov 3, 2022

PR attr-encrypted#416 included a patch for ActiveRecord 5.2: priyankatapar@7e8702b

Apparently that change was useful Rails 5.2, but it does not work for Rails 6+. It relies on the set_attribute_was method, which was removed from Rails in rails/rails#35933.

That removal would have been included in 6.0.0.rc1:
https://github.com/rails/rails/blob/6-0-stable/activerecord/CHANGELOG.md#rails-600rc1-april-24-2019

This PR addresses that by using the pessimistic version constraint to limit the patch above to Rails versions >= 5.2, < 6.

@joshbranham joshbranham merged commit 5aeb6a6 into master Nov 3, 2022
@joshbranham joshbranham deleted the restrict-set-attribute-was branch November 3, 2022 20:06
@joshbranham joshbranham restored the restrict-set-attribute-was branch November 3, 2022 20:12
@skarger skarger deleted the restrict-set-attribute-was branch November 3, 2022 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants