summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-09-07 08:08:28 -0600
committermo khan <mo@mokhan.ca>2014-09-07 08:08:28 -0600
commit48b69b3ba446bc3e97d92f1ecae47a31112a2275 (patch)
tree14d714beb85521deac8350f26ac7aac9153998e5 /app
parent24d66ea2011900309606702c9525fe1efaa1f8a9 (diff)
rename before_filter to before_action.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/admin/admin_controller.rb2
-rw-r--r--app/controllers/api/v1/api_controller.rb2
-rw-r--r--app/controllers/application_controller.rb6
-rw-r--r--app/controllers/favorites_controller.rb2
-rw-r--r--app/controllers/my/avatars_controller.rb2
-rw-r--r--app/controllers/my/base_controller.rb2
-rw-r--r--app/controllers/profiles_controller.rb2
7 files changed, 9 insertions, 9 deletions
diff --git a/app/controllers/admin/admin_controller.rb b/app/controllers/admin/admin_controller.rb
index 3e64eca2..150dc521 100644
--- a/app/controllers/admin/admin_controller.rb
+++ b/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
diff --git a/app/controllers/api/v1/api_controller.rb b/app/controllers/api/v1/api_controller.rb
index f324c519..54546048 100644
--- a/app/controllers/api/v1/api_controller.rb
+++ b/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
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index db67fe28..46ce3dd3 100644
--- a/app/controllers/application_controller.rb
+++ b/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
diff --git a/app/controllers/favorites_controller.rb b/app/controllers/favorites_controller.rb
index 79b3d6ca..d284a8b2 100644
--- a/app/controllers/favorites_controller.rb
+++ b/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])
diff --git a/app/controllers/my/avatars_controller.rb b/app/controllers/my/avatars_controller.rb
index cb534ba9..c884a4fb 100644
--- a/app/controllers/my/avatars_controller.rb
+++ b/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
diff --git a/app/controllers/my/base_controller.rb b/app/controllers/my/base_controller.rb
index ce525473..5a0e5cb9 100644
--- a/app/controllers/my/base_controller.rb
+++ b/app/controllers/my/base_controller.rb
@@ -1,5 +1,5 @@
module My
class BaseController < ApplicationController
- before_filter :authenticate!
+ before_action :authenticate!
end
end
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index c79b7038..bdaf5f95 100644
--- a/app/controllers/profiles_controller.rb
+++ b/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)