diff options
| author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-19 17:35:18 -0800 |
|---|---|---|
| committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-19 17:35:18 -0800 |
| commit | be7d2248e9505983d1aacf0b33c657e6e3ddd9db (patch) | |
| tree | 3c3a441992b5fcfd47a8f39e1f15dd4707905c48 | |
| parent | 0c356109ff5e3b146641de7f1f823fee7c75bb41 (diff) | |
| download | rails-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.
| -rw-r--r-- | activerecord/lib/active_record/attribute_methods/read.rb | 5 |
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 |
