Browse Source

Corrected with rubocop cop 'Rails/ActionFilter'.

Thorsten Eckel 9 years ago
parent
commit
1e4f47acde

+ 0 - 4
.rubocop.yml

@@ -173,10 +173,6 @@ Style/Documentation:
   Description: 'Document classes and non-namespace modules.'
   Enabled: false
 
-Rails/ActionFilter:
-  Description: 'Enforces consistent use of action filter methods.'
-  Enabled: false
-
 Style/SignalException:
   Description: 'Checks for proper usage of fail and raise.'
   StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'

+ 1 - 1
app/controllers/activity_stream_controller.rb

@@ -1,7 +1,7 @@
 # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
 
 class ActivityStreamController < ApplicationController
-  before_filter :authentication_check
+  before_action :authentication_check
 
   # GET /api/v1/activity_stream
   def show

+ 5 - 5
app/controllers/application_controller.rb

@@ -14,12 +14,12 @@ class ApplicationController < ActionController::Base
                 :mode_show_rendeder,
                 :model_index_render
 
-  skip_before_filter :verify_authenticity_token
-  before_filter :set_user, :session_update
-  before_filter :cors_preflight_check
+  skip_before_action :verify_authenticity_token
+  before_action :set_user, :session_update
+  before_action :cors_preflight_check
 
-  after_filter  :set_access_control_headers
-  after_filter  :trigger_events
+  after_action  :set_access_control_headers
+  after_action  :trigger_events
 
   # For all responses in this controller, return the CORS access control headers.
   def set_access_control_headers

+ 1 - 1
app/controllers/channels_controller.rb

@@ -1,7 +1,7 @@
 # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
 
 class ChannelsController < ApplicationController
-  before_filter :authentication_check
+  before_action :authentication_check
 
 =begin
 

+ 1 - 1
app/controllers/email_addresses_controller.rb

@@ -1,7 +1,7 @@
 # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
 
 class EmailAddressesController < ApplicationController
-  before_filter :authentication_check
+  before_action :authentication_check
 
 =begin
 

+ 1 - 1
app/controllers/groups_controller.rb

@@ -1,7 +1,7 @@
 # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
 
 class GroupsController < ApplicationController
-  before_filter :authentication_check
+  before_action :authentication_check
 
 =begin
 

+ 1 - 1
app/controllers/ical_tickets_controller.rb

@@ -3,7 +3,7 @@
 require 'icalendar'
 
 class IcalTicketsController < ApplicationController
-  before_filter  { authentication_check_action_token 'iCal' }
+  before_action  { authentication_check_action_token 'iCal' }
 
   # @path       [GET] /ical/tickets_all/:action_token
   #

+ 1 - 1
app/controllers/jobs_controller.rb

@@ -1,7 +1,7 @@
 # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
 
 class JobsController < ApplicationController
-  before_filter :authentication_check
+  before_action :authentication_check
 
   def index
     return if deny_if_not_role(Z_ROLENAME_ADMIN)

+ 1 - 1
app/controllers/links_controller.rb

@@ -1,7 +1,7 @@
 # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
 
 class LinksController < ApplicationController
-  before_filter :authentication_check
+  before_action :authentication_check
 
   # GET /api/v1/links
   def index

+ 1 - 1
app/controllers/network_controller.rb

@@ -1,7 +1,7 @@
 # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
 
 class NetworksController < ApplicationController
-  before_filter :authentication_check
+  before_action :authentication_check
 
   # GET /networks
   # GET /networks.json

Some files were not shown because too many files changed in this diff