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