aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-01-19 17:35:18 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-01-19 17:35:18 -0800
commitbe7d2248e9505983d1aacf0b33c657e6e3ddd9db (patch)
tree3c3a441992b5fcfd47a8f39e1f15dd4707905c48 /activerecord/lib/active_record/attribute_methods
parent0c356109ff5e3b146641de7f1f823fee7c75bb41 (diff)
downloadrails-be7d2248e9505983d1aacf0b33c657e6e3ddd9db.tar.gz
rails-be7d2248e9505983d1aacf0b33c657e6e3ddd9db.tar.bz2
rails-be7d2248e9505983d1aacf0b33c657e6e3ddd9db.zip
just use an alias. The target method is public, so make this one public
too.
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r--activerecord/lib/active_record/attribute_methods/read.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb
index 964c4123ef..a7c86f8f74 100644
--- a/activerecord/lib/active_record/attribute_methods/read.rb
+++ b/activerecord/lib/active_record/attribute_methods/read.rb
@@ -126,10 +126,7 @@ module ActiveRecord
self.class.type_cast_attribute(attr_name, @attributes, @attributes_cache)
end
- private
- def attribute(attribute_name)
- read_attribute(attribute_name)
- end
+ alias :attribute :read_attribute
end
end
end