Files

Class Index [+]

Quicksearch

ActiveRecord::AttributeMethods::BeforeTypeCast

Public Instance Methods

attributes_before_type_cast() click to toggle source

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
read_attribute_before_type_cast(attr_name) click to toggle source
    # File lib/active_record/attribute_methods/before_type_cast.rb, line 10
10:       def read_attribute_before_type_cast(attr_name)
11:         @attributes[attr_name]
12:       end

Private Instance Methods

attribute_before_type_cast(attribute_name) click to toggle source

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.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.