Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

call methods on AR::Model after ClassMethods module is defined

  • Loading branch information...
commit bf62077369ba9c35353d046653046d5f5d7dd8f7 1 parent 35cb772
@tenderlove tenderlove authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  activerecord/lib/active_record/attribute_methods/read.rb
View
3  activerecord/lib/active_record/attribute_methods/read.rb
@@ -8,7 +8,6 @@ module Read
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 @@ def cacheable_column?(column)
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)
Please sign in to comment.
Something went wrong with that request. Please try again.