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: self.attribute_names.inject({}) do |attrs, name| 17: attrs[name] = read_attribute_before_type_cast(name) 18: attrs 19: end 20: end
Handle *_before_type_cast for method_missing.
# File lib/active_record/attribute_methods/before_type_cast.rb, line 24 24: def attribute_before_type_cast(attribute_name) 25: if attribute_name == 'id' 26: read_attribute_before_type_cast(self.class.primary_key) 27: else 28: read_attribute_before_type_cast(attribute_name) 29: end 30: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.