method

store

Importance_1
v8.1.1 - Show latest stable - 0 notes - Class: ActiveSupport::HashWithIndifferentAccess
store(key, value, convert_value: true) public

Assigns a new value to the hash:

hash = ActiveSupport::HashWithIndifferentAccess.new
hash[:key] = 'value'

This value can be later fetched using either :key or 'key'.

If the value is a Hash or contains one or multiple Hashes, they will be converted to HashWithIndifferentAccess. unless `convert_value: false` is set.

Show source
Register or log in to add new notes.