aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_mutation_tracker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/attribute_mutation_tracker.rb')
-rw-r--r--activerecord/lib/active_record/attribute_mutation_tracker.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/attribute_mutation_tracker.rb b/activerecord/lib/active_record/attribute_mutation_tracker.rb
index a01a58f8a5..94bf641a5d 100644
--- a/activerecord/lib/active_record/attribute_mutation_tracker.rb
+++ b/activerecord/lib/active_record/attribute_mutation_tracker.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module ActiveRecord
class AttributeMutationTracker # :nodoc:
OPTION_NOT_GIVEN = Object.new
@@ -5,7 +7,6 @@ module ActiveRecord
def initialize(attributes)
@attributes = attributes
@forced_changes = Set.new
- @deprecated_forced_changes = Set.new
end
def changed_values
@@ -33,7 +34,7 @@ module ActiveRecord
end
def any_changes?
- attr_names.any? { |attr| changed?(attr) } || deprecated_forced_changes.any?
+ attr_names.any? { |attr| changed?(attr) }
end
def changed?(attr_name, from: OPTION_NOT_GIVEN, to: OPTION_NOT_GIVEN)
@@ -62,15 +63,11 @@ module ActiveRecord
forced_changes << attr_name.to_s
end
- def deprecated_force_change(attr_name)
- deprecated_forced_changes << attr_name.to_s
- end
-
# TODO Change this to private once we've dropped Ruby 2.2 support.
# Workaround for Ruby 2.2 "private attribute?" warning.
protected
- attr_reader :attributes, :forced_changes, :deprecated_forced_changes
+ attr_reader :attributes, :forced_changes
private