aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2013-12-12 12:01:52 -0800
committerGodfrey Chan <godfreykfc@gmail.com>2013-12-12 12:04:07 -0800
commitf65098148337087eb323f0d06ae08e49cf899e6f (patch)
tree395c116756832b03ca3ec5d339f1067943dc0bd6
parent93ee9f0cba607f1050610cddcfa509e5faa7e731 (diff)
downloadrails-f65098148337087eb323f0d06ae08e49cf899e6f.tar.gz
rails-f65098148337087eb323f0d06ae08e49cf899e6f.tar.bz2
rails-f65098148337087eb323f0d06ae08e49cf899e6f.zip
Added :nodoc: for `attribute_changed?` and `attribute_was` [ci skip]
These methods were made "public" in 47617ecd so that `method_missing` can invoke them without going through `send`, but they aren't meant for consumption from outside of Rails.
-rw-r--r--activemodel/lib/active_model/dirty.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb
index c5f1b3f11a..8ccb25c613 100644
--- a/activemodel/lib/active_model/dirty.rb
+++ b/activemodel/lib/active_model/dirty.rb
@@ -149,12 +149,12 @@ module ActiveModel
end
# Handle <tt>*_changed?</tt> for +method_missing+.
- def attribute_changed?(attr)
+ def attribute_changed?(attr) # :nodoc:
changed_attributes.include?(attr)
end
# Handle <tt>*_was</tt> for +method_missing+.
- def attribute_was(attr)
+ def attribute_was(attr) # :nodoc:
attribute_changed?(attr) ? changed_attributes[attr] : __send__(attr)
end