Module: ActiveRecord::AttributeMethods::BeforeTypeCast
- Extended by:
- ActiveSupport::Concern
- Defined in:
- activerecord/lib/active_record/attribute_methods/before_type_cast.rb
Instance Method Summary (collapse)
-
- (Object) attributes_before_type_cast
Returns a hash of attributes before typecasting and deserialization.
- - (Object) read_attribute_before_type_cast(attr_name)
Methods included from ActiveSupport::Concern
append_features, extended, included
Instance Method Details
- (Object) attributes_before_type_cast
Returns a hash of attributes before typecasting and deserialization.
15 16 17 |
# File 'activerecord/lib/active_record/attribute_methods/before_type_cast.rb', line 15 def attributes_before_type_cast Hash[attribute_names.map { |name| [name, read_attribute_before_type_cast(name)] }] end |
- (Object) read_attribute_before_type_cast(attr_name)
10 11 12 |
# File 'activerecord/lib/active_record/attribute_methods/before_type_cast.rb', line 10 def read_attribute_before_type_cast(attr_name) @attributes[attr_name] end |