Skip to content

Commit

Permalink
Pass changed dialog field values to resource_action_workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Aug 13, 2018
1 parent fa6ab65 commit 26bde70
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/controllers/api/base_controller/generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ def invoke_custom_action_with_dialog(type, resource, action, data, custom_button

def submit_custom_action_dialog(resource, custom_button, data)
wf = ResourceActionWorkflow.new({}, User.current_user, custom_button.resource_action, :target => resource)
data.each { |key, value| wf.set_value(key, value) } if data.present?
wf_result = wf.submit_request
wf_result = wf.submit_request(data)
raise StandardError, Array(wf_result[:errors]).join(", ") if wf_result[:errors].present?
wf_result
end
Expand Down

0 comments on commit 26bde70

Please sign in to comment.