diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-04-16 15:03:37 +0300 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-04-20 16:39:37 +0300 |
commit | 5a4ebfb47af40de6cfe29fe59dae82f8c244e5e3 (patch) | |
tree | f87ac47a9d14849659a8a40a53576080593b0670 /app/controllers/snippets_controller.rb | |
parent | 76aade28e25d1f6e8924b35ed9bd365c8889987f (diff) |
Fixed the Rails/ActionFilter cop
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r-- | app/controllers/snippets_controller.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index cd52556b203..1eff3dd29de 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -1,15 +1,15 @@ class SnippetsController < ApplicationController - before_filter :snippet, only: [:show, :edit, :destroy, :update, :raw] + before_action :snippet, only: [:show, :edit, :destroy, :update, :raw] # Allow modify snippet - before_filter :authorize_modify_snippet!, only: [:edit, :update] + before_action :authorize_modify_snippet!, only: [:edit, :update] # Allow destroy snippet - before_filter :authorize_admin_snippet!, only: [:destroy] + before_action :authorize_admin_snippet!, only: [:destroy] - before_filter :set_title + before_action :set_title - skip_before_filter :authenticate_user!, only: [:index, :user_index, :show, :raw] + skip_before_action :authenticate_user!, only: [:index, :user_index, :show, :raw] respond_to :html |