Returns a hash of attributes before typecasting and deserialization.
# File lib/active_record/attribute_methods/before_type_cast.rb, line 15 15: def attributes_before_type_cast 16: Hash[attribute_names.map { |name| [name, read_attribute_before_type_cast(name)] }] 17: end
Handle *_before_type_cast for method_missing.
# File lib/active_record/attribute_methods/before_type_cast.rb, line 21 21: def attribute_before_type_cast(attribute_name) 22: if attribute_name == 'id' 23: read_attribute_before_type_cast(self.class.primary_key) 24: else 25: read_attribute_before_type_cast(attribute_name) 26: end 27: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.