spec/dummy/app/controllers/reports_controller.rb
# remember to add authentication/authorization. E.g:
# before_filter :require_user
# load_and_authorize_resource
remember to add authentication/authorization.
remember to add authentication / authorization .
def create
    @report = Report.new(params[:report])
    if @report.save
      flash[:notice] = 'Report was successfully created.'
      redirect_to(edit_report_path(@report))
    else
      render action: "new"
    end
  end
def create @report = Report . new ( params [ :report ] ) if @report . save flash [ :notice ] = 'Report was successfully created.' redirect_to ( edit_report_path ( @report ) ) else render action : "new" end end
remember to add authentication/authorization.
remember to add authentication / authorization .