Replace old ..._filter with new ..._action
This commit is contained in:
parent
6e4c5bae29
commit
c382321934
3 changed files with 6 additions and 8 deletions
|
|
@ -1,8 +1,6 @@
|
||||||
module Admin
|
module Admin
|
||||||
class AdminController < ApplicationController
|
class AdminController < ApplicationController
|
||||||
|
before_action :authenticate_user!
|
||||||
before_filter :authenticate_user!
|
before_action :redirect_unless_admin
|
||||||
before_filter :redirect_unless_admin
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
class PollParticipationsController < ApplicationController
|
class PollParticipationsController < ApplicationController
|
||||||
include ApplicationHelper
|
include ApplicationHelper
|
||||||
before_filter :authenticate_user!
|
before_action :authenticate_user!
|
||||||
|
|
||||||
def create
|
def create
|
||||||
answer = PollAnswer.find(params[:poll_answer_id])
|
answer = PollAnswer.find(params[:poll_answer_id])
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
# the COPYRIGHT file.
|
# the COPYRIGHT file.
|
||||||
|
|
||||||
class SessionsController < Devise::SessionsController
|
class SessionsController < Devise::SessionsController
|
||||||
after_filter :reset_authentication_token, :only => [:create]
|
after_action :reset_authentication_token, only: [:create]
|
||||||
before_filter :reset_authentication_token, :only => [:destroy]
|
before_action :reset_authentication_token, only: [:destroy]
|
||||||
|
|
||||||
def reset_authentication_token
|
def reset_authentication_token
|
||||||
current_user.reset_authentication_token! unless current_user.nil?
|
current_user.reset_authentication_token! unless current_user.nil?
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue