Module: Cased::Rails::Model

Defined in:
lib/cased/rails/model.rb

Instance Method Summary collapse

Instance Method Details

#cased_idObject



6
7
8
9
# File 'lib/cased/rails/model.rb', line 6

def cased_id
  primary_key_column = self.class.primary_key
  "#{self.class.name};#{send(primary_key_column)}"
end

#cased_payloadObject



11
12
13
14
15
16
17
# File 'lib/cased/rails/model.rb', line 11

def cased_payload
  {
    cased_category => self,
  }.tap do |payload|
    cased_payload_belongs_to_associations(self, payload)
  end
end