mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 13:38:24 -04:00
before_filter is now before_action
This commit is contained in:
@@ -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,5 +1,5 @@
|
||||
class AccountTypesController < ApplicationController
|
||||
before_filter :authenticate_member!
|
||||
before_action :authenticate_member!
|
||||
load_and_authorize_resource
|
||||
|
||||
# GET /account_types
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,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,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,5 +1,5 @@
|
||||
class FollowsController < ApplicationController
|
||||
before_filter :authenticate_member!
|
||||
before_action :authenticate_member!
|
||||
load_and_authorize_resource
|
||||
skip_load_resource only: :create
|
||||
|
||||
|
||||
@@ -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,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,6 +1,6 @@
|
||||
class NotificationsController < ApplicationController
|
||||
include NotificationsHelper
|
||||
before_filter :authenticate_member!
|
||||
before_action :authenticate_member!
|
||||
load_and_authorize_resource
|
||||
|
||||
# GET /notifications
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class OrderItemsController < ApplicationController
|
||||
before_filter :authenticate_member!
|
||||
before_action :authenticate_member!
|
||||
load_and_authorize_resource
|
||||
|
||||
# POST /order_items
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class OrdersController < ApplicationController
|
||||
before_filter :authenticate_member!
|
||||
before_action :authenticate_member!
|
||||
load_and_authorize_resource
|
||||
|
||||
# GET /orders
|
||||
|
||||
@@ -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,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,5 +1,5 @@
|
||||
class ProductsController < ApplicationController
|
||||
before_filter :authenticate_member!
|
||||
before_action :authenticate_member!
|
||||
load_and_authorize_resource
|
||||
|
||||
# GET /products
|
||||
|
||||
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user