Commit 48b69b3b
Changed files (7)
app
app/controllers/admin/admin_controller.rb
@@ -1,7 +1,7 @@
module Admin
class AdminController < ApplicationController
layout "admin"
- before_filter :restrict_access!
+ before_action :restrict_access!
private
app/controllers/api/v1/api_controller.rb
@@ -1,7 +1,7 @@
module Api
module V1
class ApiController < ApplicationController
- before_filter :restrict_access
+ before_action :restrict_access
attr_reader :current_user
private
app/controllers/my/avatars_controller.rb
@@ -1,6 +1,6 @@
module My
class AvatarsController < BaseController
- before_filter :find_or_build_avatar
+ before_action :find_or_build_avatar
def edit
end
app/controllers/my/base_controller.rb
@@ -1,5 +1,5 @@
module My
class BaseController < ApplicationController
- before_filter :authenticate!
+ before_action :authenticate!
end
end
app/controllers/application_controller.rb
@@ -2,9 +2,9 @@ class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
- before_filter :load_header
- before_filter :configure_permitted_parameters, if: :devise_controller?
- before_filter :extend_session_cookie
+ before_action :load_header
+ before_action :configure_permitted_parameters, if: :devise_controller?
+ before_action :extend_session_cookie
helper_method :current_user, :user_signed_in?
rescue_from ActiveRecord::RecordNotFound, with: :record_not_found
app/controllers/favorites_controller.rb
@@ -1,5 +1,5 @@
class FavoritesController < ApplicationController
- before_filter :authenticate!
+ before_action :authenticate!
def index
@creation = FindCreationQuery.new.fetch(params[:creation_id])
app/controllers/profiles_controller.rb
@@ -1,5 +1,5 @@
class ProfilesController < ApplicationController
- before_filter :authenticate!, :except => [:index, :show]
+ before_action :authenticate!, :except => [:index, :show]
def index
@profiles = User.includes(:avatar).where('creations_count > 0').order(:creations_count => :desc).page(params[:page]).per(12)