aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods/read.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-07-28 23:52:53 -0500
committerJoshua Peek <josh@joshpeek.com>2009-07-30 17:54:00 -0500
commit94dabf9b4bf14de665cb17570209078f16920e54 (patch)
tree467bcebef4282d94631fe77fc857cdbf999ed438 /activerecord/lib/active_record/attribute_methods/read.rb
parentc2b075bed084a59a674469d09db016aaa3365c2e (diff)
downloadrails-94dabf9b4bf14de665cb17570209078f16920e54.tar.gz
rails-94dabf9b4bf14de665cb17570209078f16920e54.tar.bz2
rails-94dabf9b4bf14de665cb17570209078f16920e54.zip
Generate methods for all suffixes
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods/read.rb')
-rw-r--r--activerecord/lib/active_record/attribute_methods/read.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb
index 9f948536fc..dda700d04c 100644
--- a/activerecord/lib/active_record/attribute_methods/read.rb
+++ b/activerecord/lib/active_record/attribute_methods/read.rb
@@ -3,9 +3,9 @@ module ActiveRecord
module Read
extend ActiveSupport::Concern
- # included do
- # attribute_method_suffix ""
- # end
+ included do
+ attribute_method_suffix ""
+ end
module ClassMethods
protected
@@ -74,6 +74,11 @@ module ActiveRecord
"#{attr_name} was supposed to be a #{self.class.serialized_attributes[attr_name]}, but was a #{unserialized_object.class.to_s}"
end
end
+
+ private
+ def attribute(attribute_name)
+ read_attribute(attribute_name)
+ end
end
end
end