before_filter => before_action

This commit is contained in:
Devin Howard 2016-02-28 17:48:18 +08:00
parent 25774d9f16
commit 36c5ddab1f
9 changed files with 10 additions and 10 deletions

View file

@ -1,7 +1,7 @@
class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :get_invite_link
before_action :get_invite_link
after_action :allow_embedding
# this is for global login

View file

@ -1,6 +1,6 @@
class MappingsController < ApplicationController
before_filter :require_user, only: [:create, :update, :destroy]
before_action :require_user, only: [:create, :update, :destroy]
respond_to :json

View file

@ -1,5 +1,5 @@
class MapsController < ApplicationController
before_filter :require_user, only: [:create, :update, :screenshot, :destroy]
before_action :require_user, only: [:create, :update, :screenshot, :destroy]
respond_to :html, :json

View file

@ -1,6 +1,6 @@
class MetacodeSetsController < ApplicationController
before_filter :require_admin
before_action :require_admin
# GET /metacode_sets
# GET /metacode_sets.json

View file

@ -1,5 +1,5 @@
class MetacodesController < ApplicationController
before_filter :require_admin, except: [:index]
before_action :require_admin, except: [:index]
# GET /metacodes
# GET /metacodes.json

View file

@ -1,7 +1,7 @@
class SynapsesController < ApplicationController
include TopicsHelper
before_filter :require_user, only: [:create, :update, :destroy]
before_action :require_user, only: [:create, :update, :destroy]
respond_to :json

View file

@ -1,7 +1,7 @@
class TopicsController < ApplicationController
include TopicsHelper
before_filter :require_user, only: [:create, :update, :destroy]
before_action :require_user, only: [:create, :update, :destroy]
respond_to :html, :js, :json

View file

@ -1,6 +1,6 @@
class Users::RegistrationsController < Devise::RegistrationsController
before_filter :configure_sign_up_params, only: [:create]
before_filter :configure_account_update_params, only: [:update]
before_action :configure_sign_up_params, only: [:create]
before_action :configure_account_update_params, only: [:update]
protected
def after_sign_up_path_for(resource)

View file

@ -1,5 +1,5 @@
class UsersController < ApplicationController
before_filter :require_user, only: [:edit, :update, :updatemetacodes]
before_action :require_user, only: [:edit, :update, :updatemetacodes]
respond_to :html, :json