aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods/read.rb
diff options
context:
space:
mode:
authorKuldeep Aggarwal <kd.engineer@yahoo.co.in>2015-01-06 21:46:35 +0530
committerKuldeep Aggarwal <kd.engineer@yahoo.co.in>2015-01-06 21:46:35 +0530
commitd4c5406279551919920ddf3fa586a8a30357df25 (patch)
treeff9a2add29dc8759564d01e79813f30886c3fcca /activerecord/lib/active_record/attribute_methods/read.rb
parentcc274c3f18a131aed0920b1f1c5851c8ce6cfc64 (diff)
downloadrails-d4c5406279551919920ddf3fa586a8a30357df25.tar.gz
rails-d4c5406279551919920ddf3fa586a8a30357df25.tar.bz2
rails-d4c5406279551919920ddf3fa586a8a30357df25.zip
fix `attribute` method scoping(i.e. private)
ref #52f641264b1325a4c2bdce7971b14524bd4905f1
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods/read.rb')
-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