aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods/read.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-08-04 23:36:05 -0500
committerJoshua Peek <josh@joshpeek.com>2009-08-04 23:36:05 -0500
commitf8d3c72c39ad209abca7f3613f91fb3a03805261 (patch)
tree2d6f5b67e3212b59be1f00391eeb64ebf5b40548 /activerecord/lib/active_record/attribute_methods/read.rb
parent64eecdd131c93d7d6c8ef9c6a7ae6b9d76c72a8b (diff)
downloadrails-f8d3c72c39ad209abca7f3613f91fb3a03805261.tar.gz
rails-f8d3c72c39ad209abca7f3613f91fb3a03805261.tar.bz2
rails-f8d3c72c39ad209abca7f3613f91fb3a03805261.zip
Extract generic attribute method generation to AMo
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, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb
index 90acb769a9..0b7d6d9094 100644
--- a/activerecord/lib/active_record/attribute_methods/read.rb
+++ b/activerecord/lib/active_record/attribute_methods/read.rb
@@ -51,7 +51,7 @@ module ActiveRecord
private
# Define read method for serialized attribute.
def define_read_method_for_serialized_attribute(attr_name)
- generated_methods.module_eval("def #{attr_name}; unserialize_attribute('#{attr_name}'); end", __FILE__, __LINE__)
+ generated_attribute_methods.module_eval("def #{attr_name}; unserialize_attribute('#{attr_name}'); end", __FILE__, __LINE__)
end
# Define an attribute reader method. Cope with nil column.
@@ -66,7 +66,7 @@ module ActiveRecord
if cache_attribute?(attr_name)
access_code = "@attributes_cache['#{attr_name}'] ||= (#{access_code})"
end
- generated_methods.module_eval("def #{symbol}; #{access_code}; end", __FILE__, __LINE__)
+ generated_attribute_methods.module_eval("def #{symbol}; #{access_code}; end", __FILE__, __LINE__)
end
end