Method: ActiveRecord::Store::IndifferentCoder.as_indifferent_hash
- Defined in:
- activerecord/lib/active_record/store.rb
.as_indifferent_hash(obj) ⇒ Object
278 279 280 281 282 283 284 285 286 287 |
# File 'activerecord/lib/active_record/store.rb', line 278 def self.as_indifferent_hash(obj) case obj when ActiveSupport::HashWithIndifferentAccess obj when Hash obj.with_indifferent_access else ActiveSupport::HashWithIndifferentAccess.new end end |