From f82369a9f84016e24a285bb0abe3a5ba41228dd0 Mon Sep 17 00:00:00 2001 From: echarp Date: Mon, 19 Sep 2016 16:35:19 +0200 Subject: [PATCH] Latest rubocop --- Gemfile.lock | 2 +- app/controllers/moderations_controller.rb | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 74532ea9..a2c3f060 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -314,7 +314,7 @@ GEM request_store (1.3.1) responders (2.3.0) railties (>= 4.2.0, < 5.1) - rubocop (0.42.0) + rubocop (0.43.0) parser (>= 2.3.1.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) diff --git a/app/controllers/moderations_controller.rb b/app/controllers/moderations_controller.rb index 7d5ba4b9..b5ec0de6 100644 --- a/app/controllers/moderations_controller.rb +++ b/app/controllers/moderations_controller.rb @@ -79,8 +79,9 @@ class ModerationsController < ApplicationController end def generate_destroy_reason - @moderation.reason = params[:event][:reason] - if params[:reason] != 'r_4' + if params[:reason] == 'r_4' + @moderation.reason = params[:event][:reason] + else @moderation.reason = t "moderations.refuse.reason_#{params[:reason]}_long" end end