Skip to content

Commit

Permalink
Merge pull request idbygeorge#125 from keith-ferney/stage
Browse files Browse the repository at this point in the history
should use the correct variables in update workflow_document
  • Loading branch information
keith-ferney committed Aug 20, 2018
2 parents 36a8255 + 45f0ac1 commit 92bb7ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/controllers/workflow_documents_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def edit
def update
get_document params[:id]
if params[:document][:workflow_step_id] != @document.workflow_step_id && !params[:document][:workflow_step_id].blank? && !params[:document][:user_id].blank?
wfs = WorkflowStep.find(params[:document][:workflow_step_id])
if wfs.step_type == "start_step"
user = User.find(params[:document][:user_id])
WorkflowMailer.welcome_email(user,@organization,wfs.slug,component_allowed_liquid_variables(@document.workflow_step,User.find(params[:document][:user_id]),@organization)).deliver_later
@wfs = WorkflowStep.find(params[:document][:workflow_step_id])
if @wfs.step_type == "start_step"
@user = User.find(params[:document][:user_id])
WorkflowMailer.welcome_email(@user,@organization,@wfs.slug,component_allowed_liquid_variables(@document.workflow_step,User.find(params[:document][:user_id]),@organization)).deliver_later
end
end

Expand Down

0 comments on commit 92bb7ed

Please sign in to comment.