From 252961250d5c9698f9e1f80e6db080960204a369 Mon Sep 17 00:00:00 2001 From: Laust Rud Jacobsen Date: Sun, 11 Oct 2015 14:13:17 +0200 Subject: [PATCH] Rubocop: Rails 4: use *_before_action instead of *_before_filter --- .rubocop_todo.yml | 7 ------- app/controllers/notices_controller.rb | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d9b2365..10320e1 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -40,13 +40,6 @@ Performance/StringReplacement: - 'app/models/notification_services/gtalk_service.rb' - 'lib/hoptoad/v2.rb' -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, Include. -Rails/ActionFilter: - Exclude: - - 'app/controllers/notices_controller.rb' - # Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: Include. diff --git a/app/controllers/notices_controller.rb b/app/controllers/notices_controller.rb index 235d34b..164ed5f 100644 --- a/app/controllers/notices_controller.rb +++ b/app/controllers/notices_controller.rb @@ -3,7 +3,7 @@ class NoticesController < ApplicationController class ParamsError < StandardError; end skip_before_action :authenticate_user!, only: :create - skip_before_filter :verify_authenticity_token, only: :create + skip_before_action :verify_authenticity_token, only: :create rescue_from ParamsError, :with => :bad_params -- libgit2 0.21.2