Created
October 31, 2015 13:24
-
-
Save bookwyrm/37cf7d7fad4d5c25bac9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ReportsController < ApplicationController | |
include Trailblazer::Operation::Controller | |
def create | |
run Report::Create do |op| | |
flash[:notice] = "Created Report for \"#{op.work_scope_report.title}\"" | |
return redirect_to work_scope_report_path(op.work_scope_report) | |
end | |
@wsr = WorkScopeReport.find(params[:work_scope_report_id]) | |
render :new | |
end | |
private | |
# Merge in current user | |
def process_params!(params) | |
params[:current_user] = current_user | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment