Module: Approval::ActsAsResource

Extended by:
ActiveSupport::Concern
Defined in:
app/models/concerns/approval/acts_as_resource.rb

Instance Method Summary collapse

Instance Method Details

#create_params_for_approvalObject


18
19
20
# File 'app/models/concerns/approval/acts_as_resource.rb', line 18

def create_params_for_approval
  attributes.except(*approval_ignore_fields).compact
end

#update_params_for_approvalObject


22
23
24
# File 'app/models/concerns/approval/acts_as_resource.rb', line 22

def update_params_for_approval
  changes.except(*approval_ignore_fields).each_with_object({}) {|(k, v), h| h[k] = v.last }
end