Method: Audit::Admin::ChecksController#create

Defined in:
app/controllers/audit/admin/checks_controller.rb

#createObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/controllers/audit/admin/checks_controller.rb', line 12

def create
  @check = Check.new(check_params)

  respond_to do |format|
    if @check.save
      format.js
      format.html { redirect_to checks_url, notice: 'Check was successfully created.' }
    else
      format.js
      format.html { render :new }
    end
  end
end