app/controllers/recognitions_controller.rb
# POST /recognitions
# POST /recognitions.json
# rubocop:disable Metrics/MethodLength
POST /recognitions
POST /recognitions.json
rubocop:disable Metrics/MethodLength
POST / recognitions POST / recognitions . json rubocop : disable Metrics / MethodLength
def create
    @recognition = Recognition.new(recognition_params)
    @recognition.user = current_user
    respond_to do |format|
      if @recognition.save
        format.html { redirect_to @recognition, notice: 'Recognition was successfully created.' }
        format.json { render :show, status: :created, location: @recognition }
      else
        format.html { render :new }
        format.json { render json: @recognition.errors, status: :unprocessable_entity }
      end
    end
  end
def create @recognition = Recognition . new ( recognition_params ) @recognition . user = current_user respond_to do | format | if @recognition . save format . html { redirect_to @recognition , notice : 'Recognition was successfully created.' } format . json { render :show , status : :created , location : @recognition } else format . html { render :new } format . json { render json : @recognition . errors , status : :unprocessable_entity } end end end
POST /recognitions
POST /recognitions.json
rubocop:disable Metrics/MethodLength
POST / recognitions POST / recognitions . json rubocop : disable Metrics / MethodLength