Skip to content

Instantly share code, notes, and snippets.

@bleonard
Created March 5, 2017 22:11
Show Gist options
  • Save bleonard/12281ee2d853576f44213b94d39d9880 to your computer and use it in GitHub Desktop.
Save bleonard/12281ee2d853576f44213b94d39d9880 to your computer and use it in GitHub Desktop.
class JobsController < ApplicationController
def confirm
@job = Job.find(params[:id])
authorize @job, :confirm? # authorization
op = Organic::JobConfirmOp.new(current_user)
op.submit!(params.merge(job_id: @job.id)) # perform action
render :show # render template
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment