aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2015-01-06 17:07:49 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2015-01-06 17:07:49 -0200
commitf542ffeffc2c9910176c32450aeabbdb7959d124 (patch)
tree7a12c0cdeb5eacdab4f07504b4494d88ed93b940
parentb1124a2ac88778c0feb0157ac09367cbd204bf01 (diff)
parentd4c5406279551919920ddf3fa586a8a30357df25 (diff)
downloadrails-f542ffeffc2c9910176c32450aeabbdb7959d124.tar.gz
rails-f542ffeffc2c9910176c32450aeabbdb7959d124.tar.bz2
rails-f542ffeffc2c9910176c32450aeabbdb7959d124.zip
Merge pull request #18368 from kuldeepaggarwal/fix-attribute-scope
fix `attribute` method scoping(i.e. private)
-rw-r--r--activerecord/lib/active_record/attribute_methods/read.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb
index 17f287c1b7..24e30b6608 100644
--- a/activerecord/lib/active_record/attribute_methods/read.rb
+++ b/activerecord/lib/active_record/attribute_methods/read.rb
@@ -72,10 +72,8 @@ module ActiveRecord
def _read_attribute(attr_name) # :nodoc:
@attributes.fetch_value(attr_name.to_s) { |n| yield n if block_given? }
end
-
- private
-
alias :attribute :_read_attribute
+ private :attribute
end
end