before_filter is now before_action

This commit is contained in:
Brenda Wallace committed 2016-11-26 17:20:13 +13:00
1 parent bcdd2a9167
commit 07c135eeb5
20 files changed
+20 -47

No files matched your search

-27
View File
@@ -121,33 +121,6 @@ Performance/StringReplacement:
- 'app/models/seed.rb'
- 'spec/rails_helper.rb'
# Offense count: 21
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, Include.
# SupportedStyles: action, filter
# Include: app/controllers/**/*.rb
Rails/ActionFilter:
Exclude:
- 'app/controllers/account_types_controller.rb'
- 'app/controllers/accounts_controller.rb'
- 'app/controllers/alternate_names_controller.rb'
- 'app/controllers/application_controller.rb'
- 'app/controllers/authentications_controller.rb'
- 'app/controllers/comments_controller.rb'
- 'app/controllers/crops_controller.rb'
- 'app/controllers/follows_controller.rb'
- 'app/controllers/gardens_controller.rb'
- 'app/controllers/harvests_controller.rb'
- 'app/controllers/notifications_controller.rb'
- 'app/controllers/order_items_controller.rb'
- 'app/controllers/orders_controller.rb'
- 'app/controllers/plantings_controller.rb'
- 'app/controllers/posts_controller.rb'
- 'app/controllers/products_controller.rb'
- 'app/controllers/roles_controller.rb'
- 'app/controllers/scientific_names_controller.rb'
- 'app/controllers/seeds_controller.rb'
# Offense count: 10
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: strict, flexible
+1 -1
View File
@@ -1,5 +1,5 @@
class AccountTypesController < ApplicationController
before_filter :authenticate_member!
before_action :authenticate_member!
load_and_authorize_resource
# GET /account_types
+1 -1
View File
@@ -1,5 +1,5 @@
class AccountsController < ApplicationController
before_filter :authenticate_member!
before_action :authenticate_member!
load_and_authorize_resource
# GET /accounts
@@ -1,5 +1,5 @@
class AlternateNamesController < ApplicationController
before_filter :authenticate_member!, except: [:index, :show]
before_action :authenticate_member!, except: [:index, :show]
load_and_authorize_resource
# GET /alternate_names
+2 -2
View File
@@ -3,8 +3,8 @@ class ApplicationController < ActionController::Base
include ApplicationHelper
after_filter :store_location
before_filter :set_locale
after_action :store_location
before_action :set_locale
def store_location
if (request.path != "/members/sign_in" &&
@@ -1,5 +1,5 @@
class AuthenticationsController < ApplicationController
before_filter :authenticate_member!
before_action :authenticate_member!
load_and_authorize_resource
# POST /authentications
+1 -1
View File
@@ -1,5 +1,5 @@
class CommentsController < ApplicationController
before_filter :authenticate_member!, except: [:index, :show]
before_action :authenticate_member!, except: [:index, :show]
load_and_authorize_resource
# GET /comments
+1 -1
View File
@@ -1,7 +1,7 @@
require 'will_paginate/array'
class CropsController < ApplicationController
before_filter :authenticate_member!, except: [:index, :hierarchy, :search, :show]
before_action :authenticate_member!, except: [:index, :hierarchy, :search, :show]
load_and_authorize_resource
skip_authorize_resource only: [:hierarchy, :search]
+1 -1
View File
@@ -1,5 +1,5 @@
class FollowsController < ApplicationController
before_filter :authenticate_member!
before_action :authenticate_member!
load_and_authorize_resource
skip_load_resource only: :create
+1 -1
View File
@@ -1,5 +1,5 @@
class GardensController < ApplicationController
before_filter :authenticate_member!, except: [:index, :show]
before_action :authenticate_member!, except: [:index, :show]
load_and_authorize_resource
# GET /gardens
+1 -1
View File
@@ -1,5 +1,5 @@
class HarvestsController < ApplicationController
before_filter :authenticate_member!, except: [:index, :show]
before_action :authenticate_member!, except: [:index, :show]
load_and_authorize_resource
# GET /harvests
+1 -1
View File
@@ -1,6 +1,6 @@
class NotificationsController < ApplicationController
include NotificationsHelper
before_filter :authenticate_member!
before_action :authenticate_member!
load_and_authorize_resource
# GET /notifications
+1 -1
View File
@@ -1,5 +1,5 @@
class OrderItemsController < ApplicationController
before_filter :authenticate_member!
before_action :authenticate_member!
load_and_authorize_resource
# POST /order_items
+1 -1
View File
@@ -1,5 +1,5 @@
class OrdersController < ApplicationController
before_filter :authenticate_member!
before_action :authenticate_member!
load_and_authorize_resource
# GET /orders
+1 -1
View File
@@ -1,5 +1,5 @@
class PlantingsController < ApplicationController
before_filter :authenticate_member!, except: [:index, :show]
before_action :authenticate_member!, except: [:index, :show]
load_and_authorize_resource
# GET /plantings
+1 -1
View File
@@ -1,5 +1,5 @@
class PostsController < ApplicationController
before_filter :authenticate_member!, except: [:index, :show]
before_action :authenticate_member!, except: [:index, :show]
load_and_authorize_resource
# GET /posts
+1 -1
View File
@@ -1,5 +1,5 @@
class ProductsController < ApplicationController
before_filter :authenticate_member!
before_action :authenticate_member!
load_and_authorize_resource
# GET /products
+1 -1
View File
@@ -1,5 +1,5 @@
class RolesController < ApplicationController
before_filter :authenticate_member!
before_action :authenticate_member!
load_and_authorize_resource
# GET /roles
@@ -1,5 +1,5 @@
class ScientificNamesController < ApplicationController
before_filter :authenticate_member!, except: [:index, :show]
before_action :authenticate_member!, except: [:index, :show]
load_and_authorize_resource
# GET /scientific_names
+1 -1
View File
@@ -1,5 +1,5 @@
class SeedsController < ApplicationController
before_filter :authenticate_member!, except: [:index, :show]
before_action :authenticate_member!, except: [:index, :show]
load_and_authorize_resource
# GET /seeds