Class: Gamifier::RewardDefinition

Inherits:
Model
  • Object
show all
Defined in:
lib/gamifier/models/reward_definition.rb

Instance Attribute Summary

Attributes inherited from Model

#engine

Instance Method Summary collapse

Methods inherited from Model

#_id, #attributes, #destroy, #new?, #path, #payload_for_submission, #replace_if_successful, #save, #update_attributes

Methods included from Model::ClassMethods

#container, #mutable_attributes, #path, #reset!, #special_attributes, #store_or_get

Instance Method Details

#encode(key, value) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/gamifier/models/reward_definition.rb', line 5

def encode(key, value)
  case key
  when :components
    MultiJson.dump(value)
  else
    super(key,value)
  end
end