Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
AO3-5111: Fix attribute_changed deprecation message #3007
Conversation
| @@ -6,7 +6,7 @@ class ApplicationRecord < ActiveRecord::Base | ||
| def update_sanitizer_version | ||
| ArchiveConfig.FIELDS_ALLOWING_HTML.each do |field| | ||
| - if self.respond_to?("#{field}_changed?") && self.send("#{field}_changed?") | ||
| + if self.will_save_change_to_attribute?(field) |
sarken
added
the
Awaiting review
label
Aug 24, 2017
sarken
merged commit 110477f
into
otwcode:master
Aug 24, 2017
sarken
added
Reviewed: Ready to Merge
and removed
Awaiting review
labels
Aug 24, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
elzj commentedAug 24, 2017
Issue
https://otwarchive.atlassian.net/browse/AO3-5111
Purpose
Updates syntax in before save hook to remove deprecation warning.
Testing
The sanitizer version should still set properly, but there's no way to test that since we don't actually use it. Tests should run without a zillion deprecation warnings now.