Class: ActiveRecord::Store::IndifferentHashAccessor
- Inherits:
-
HashAccessor
- Object
- HashAccessor
- ActiveRecord::Store::IndifferentHashAccessor
- Defined in:
- lib/active_record/store.rb
Overview
:nodoc:
Class Method Summary collapse
Methods inherited from HashAccessor
Class Method Details
.prepare(object, attribute) ⇒ Object
277 278 279 280 281 282 283 284 285 286 |
# File 'lib/active_record/store.rb', line 277 def self.prepare(object, attribute) store_object = object.public_send(attribute) unless store_object.is_a?(ActiveSupport::HashWithIndifferentAccess) store_object = IndifferentCoder.as_indifferent_hash(store_object) object.public_send :"#{attribute}=", store_object end store_object end |