class method self.prepare

Ruby on Rails 4.1.16

Since v4.1.16 Last seen in v4.1.16

Signature

self.prepare(object, store_attribute)

No documentation comment.

Parameters

object req
store_attribute req
Source
# File activerecord/lib/active_record/store.rb, line 165
        def self.prepare(object, store_attribute)
          attribute = object.send(store_attribute)
          unless attribute.is_a?(ActiveSupport::HashWithIndifferentAccess)
            attribute = IndifferentCoder.as_indifferent_hash(attribute)
            object.send :"#{store_attribute}=", attribute
          end
          attribute
        end

Defined in activerecord/lib/active_record/store.rb line 165 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Store::IndifferentHashAccessor

Type at least 2 characters to search.

↑↓ navigate · open · esc close