aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-07-02 15:43:29 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-07-02 15:43:29 -0700
commit6e43fcb33365c66359e6363abdc2d108aef9fd67 (patch)
tree9c039f7cb6209c3f87d79116dba2e9684068ddda /activerecord/lib/active_record/attribute_methods.rb
parentb670d799e4f7c1ddc235fbeec1ca1806a8b5d6ff (diff)
downloadrails-6e43fcb33365c66359e6363abdc2d108aef9fd67.tar.gz
rails-6e43fcb33365c66359e6363abdc2d108aef9fd67.tar.bz2
rails-6e43fcb33365c66359e6363abdc2d108aef9fd67.zip
remove private attribute reader
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods.rb')
-rw-r--r--activerecord/lib/active_record/attribute_methods.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb
index be6d50e542..ff93640814 100644
--- a/activerecord/lib/active_record/attribute_methods.rb
+++ b/activerecord/lib/active_record/attribute_methods.rb
@@ -37,7 +37,7 @@ module ActiveRecord
# Use a mutex; we don't want two thread simultaneously trying to define
# attribute methods.
generated_attribute_methods.synchronize do
- return false if attribute_methods_generated?
+ return false if @attribute_methods_generated
superclass.define_attribute_methods unless self == base_class
super(column_names)
@attribute_methods_generated = true
@@ -45,12 +45,8 @@ module ActiveRecord
true
end
- def attribute_methods_generated? # :nodoc:
- @attribute_methods_generated
- end
-
def undefine_attribute_methods # :nodoc:
- super if attribute_methods_generated?
+ super if @attribute_methods_generated
@attribute_methods_generated = false
end