Method: Cosmos::Model.set
- Defined in:
- lib/cosmos/models/model.rb
.set(json, scope:) ⇒ Object
Sets (updates) the redis hash of this model
75 76 77 78 79 |
# File 'lib/cosmos/models/model.rb', line 75 def self.set(json, scope:) json[:scope] = scope json.transform_keys!(&:to_sym) self.new(**json).create(force: true) end |