Class: OpenGithubIssue::ReportsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/open_github_issue/reports_controller.rb

Instance Method Summary collapse

Instance Method Details

#reportObject



3
4
5
6
7
8
9
10
11
# File 'app/controllers/open_github_issue/reports_controller.rb', line 3

def report
  if Constraint.call(self) && Reporter.call(permitted_params, self)
    flash[:notice] = t('open_github_issue.thanks')
  else
    flash[:alert] = t('open_github_issue.error')
  end

  redirect_to permitted_params[:path]
end