before_filter => before_action
This commit is contained in:
parent
155eac41d8
commit
ef5d85c2bf
9 changed files with 10 additions and 10 deletions
|
@ -2,7 +2,7 @@ class ApplicationController < ActionController::Base
|
||||||
include Pundit
|
include Pundit
|
||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
|
|
||||||
before_filter :get_invite_link
|
before_action :get_invite_link
|
||||||
after_action :allow_embedding
|
after_action :allow_embedding
|
||||||
|
|
||||||
# this is for global login
|
# this is for global login
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
class MappingsController < ApplicationController
|
class MappingsController < ApplicationController
|
||||||
|
|
||||||
before_filter :require_user, only: [:create, :update, :destroy]
|
before_action :require_user, only: [:create, :update, :destroy]
|
||||||
|
|
||||||
respond_to :json
|
respond_to :json
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class MapsController < ApplicationController
|
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
|
respond_to :html, :json
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
class MetacodeSetsController < ApplicationController
|
class MetacodeSetsController < ApplicationController
|
||||||
|
|
||||||
before_filter :require_admin
|
before_action :require_admin
|
||||||
|
|
||||||
# GET /metacode_sets
|
# GET /metacode_sets
|
||||||
# GET /metacode_sets.json
|
# GET /metacode_sets.json
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class MetacodesController < ApplicationController
|
class MetacodesController < ApplicationController
|
||||||
before_filter :require_admin, except: [:index]
|
before_action :require_admin, except: [:index]
|
||||||
|
|
||||||
# GET /metacodes
|
# GET /metacodes
|
||||||
# GET /metacodes.json
|
# GET /metacodes.json
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class SynapsesController < ApplicationController
|
class SynapsesController < ApplicationController
|
||||||
include TopicsHelper
|
include TopicsHelper
|
||||||
|
|
||||||
before_filter :require_user, only: [:create, :update, :destroy]
|
before_action :require_user, only: [:create, :update, :destroy]
|
||||||
|
|
||||||
respond_to :json
|
respond_to :json
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class TopicsController < ApplicationController
|
class TopicsController < ApplicationController
|
||||||
include TopicsHelper
|
include TopicsHelper
|
||||||
|
|
||||||
before_filter :require_user, only: [:create, :update, :destroy]
|
before_action :require_user, only: [:create, :update, :destroy]
|
||||||
|
|
||||||
respond_to :html, :js, :json
|
respond_to :html, :js, :json
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
class Users::RegistrationsController < Devise::RegistrationsController
|
class Users::RegistrationsController < Devise::RegistrationsController
|
||||||
before_filter :configure_sign_up_params, only: [:create]
|
before_action :configure_sign_up_params, only: [:create]
|
||||||
before_filter :configure_account_update_params, only: [:update]
|
before_action :configure_account_update_params, only: [:update]
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def after_sign_up_path_for(resource)
|
def after_sign_up_path_for(resource)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class UsersController < ApplicationController
|
class UsersController < ApplicationController
|
||||||
before_filter :require_user, only: [:edit, :update, :updatemetacodes]
|
before_action :require_user, only: [:edit, :update, :updatemetacodes]
|
||||||
|
|
||||||
respond_to :html, :json
|
respond_to :html, :json
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue