method
decorate_columns
v4.1.8 -
Show latest stable
-
0 notes -
Class: ClassMethods
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2 (0)
- 4.1.8 (0)
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2
- 7.1.3.4
- What's this?
decorate_columns(columns_hash)
public
Hide source
# File activerecord/lib/active_record/model_schema.rb, line 230 def decorate_columns(columns_hash) # :nodoc: return if columns_hash.empty? @serialized_column_names ||= self.columns_hash.keys.find_all do |name| serialized_attributes.key?(name) end @serialized_column_names.each do |name| columns_hash[name] = AttributeMethods::Serialization::Type.new(columns_hash[name]) end @time_zone_column_names ||= self.columns_hash.find_all do |name, col| create_time_zone_conversion_attribute?(name, col) end.map!(&:first) @time_zone_column_names.each do |name| columns_hash[name] = AttributeMethods::TimeZoneConversion::Type.new(columns_hash[name]) end columns_hash end