Class: Wf::Entry
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Wf::Entry
- Defined in:
- app/models/wf/entry.rb
Instance Method Summary collapse
Instance Method Details
#for_mini_racer ⇒ Object
31 32 33 |
# File 'app/models/wf/entry.rb', line 31 def for_mini_racer field_values.includes(:field).map { |x| [x.field.name, x.value_after_cast] }.to_h end |
#json ⇒ Object
27 28 29 |
# File 'app/models/wf/entry.rb', line 27 def json field_values.includes(:field).map { |x| [x.field_id.to_i, { field_id: x.id.to_i, field_name: x.field.name, value: x.value_after_cast }] }.to_h end |
#update_payload! ⇒ Object
35 36 37 |
# File 'app/models/wf/entry.rb', line 35 def update_payload! update(payload: json) end |