aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/attribute.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/attribute.rb')
-rw-r--r--activemodel/lib/active_model/attribute.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/activemodel/lib/active_model/attribute.rb b/activemodel/lib/active_model/attribute.rb
index 27f3e38e31..3f19cda07b 100644
--- a/activemodel/lib/active_model/attribute.rb
+++ b/activemodel/lib/active_model/attribute.rb
@@ -133,10 +133,6 @@ module ActiveModel
end
protected
-
- attr_reader :original_attribute
- alias_method :assigned?, :original_attribute
-
def original_value_for_database
if assigned?
original_attribute.original_value_for_database
@@ -146,6 +142,9 @@ module ActiveModel
end
private
+ attr_reader :original_attribute
+ alias :assigned? :original_attribute
+
def initialize_dup(other)
if defined?(@value) && @value.duplicable?
@value = @value.dup