aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-08-24 15:17:38 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-08-24 15:17:46 -0700
commitbf62077369ba9c35353d046653046d5f5d7dd8f7 (patch)
tree38b941d700fff06fadcddd0198167ab5b869f5b7 /activerecord/lib/active_record
parent35cb7722b24eae878e4ba9f0e82a728b5f398fa8 (diff)
downloadrails-bf62077369ba9c35353d046653046d5f5d7dd8f7.tar.gz
rails-bf62077369ba9c35353d046653046d5f5d7dd8f7.tar.bz2
rails-bf62077369ba9c35353d046653046d5f5d7dd8f7.zip
call methods on AR::Model after ClassMethods module is defined
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/attribute_methods/read.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb
index a7af086e43..5fd139156c 100644
--- a/activerecord/lib/active_record/attribute_methods/read.rb
+++ b/activerecord/lib/active_record/attribute_methods/read.rb
@@ -8,7 +8,6 @@ module ActiveRecord
extend ActiveSupport::Concern
ATTRIBUTE_TYPES_CACHED_BY_DEFAULT = [:datetime, :timestamp, :time, :date]
- ActiveRecord::Model.attribute_types_cached_by_default = ATTRIBUTE_TYPES_CACHED_BY_DEFAULT
included do
config_attribute :attribute_types_cached_by_default
@@ -64,6 +63,8 @@ module ActiveRecord
end
end
+ ActiveRecord::Model.attribute_types_cached_by_default = ATTRIBUTE_TYPES_CACHED_BY_DEFAULT
+
# Returns the value of the attribute identified by <tt>attr_name</tt> after it has been typecast (for example,
# "2004-12-12" in a data column is cast to a date object, like Date.new(2004, 12, 12)).
def read_attribute(attr_name)