upgrade(rails 5): change before_filter to before_action
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class AdminController < ApplicationController
|
||||
before_action :administrative, :if => :admin_param, :except => [:get_user]
|
||||
skip_before_filter :has_info
|
||||
skip_before_action :has_info
|
||||
|
||||
def dashboard
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class Api::V1::MobileController < ApplicationController
|
||||
skip_before_filter :authenticated
|
||||
before_filter :mobile_request?
|
||||
skip_before_action :authenticated
|
||||
before_action :mobile_request?
|
||||
|
||||
respond_to :json
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Api::V1::UsersController < ApplicationController
|
||||
skip_before_filter :authenticated
|
||||
before_filter :valid_api_token
|
||||
before_filter :extrapolate_user
|
||||
skip_before_action :authenticated
|
||||
before_action :valid_api_token
|
||||
before_action :extrapolate_user
|
||||
|
||||
respond_to :json
|
||||
|
||||
@@ -22,6 +22,8 @@ class Api::V1::UsersController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# TODO I don't believe returning from this method is a valid method
|
||||
# of halting execution anymore.
|
||||
def identify_user(token="")
|
||||
# We've had issues with URL encoding, etc. causing issues so just to be safe
|
||||
# we will go ahead and unescape the user's token
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class DashboardController < ApplicationController
|
||||
skip_before_filter :has_info
|
||||
skip_before_action :has_info
|
||||
|
||||
def home
|
||||
@user = current_user
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class PasswordResetsController < ApplicationController
|
||||
skip_before_filter :authenticated
|
||||
skip_before_action :authenticated
|
||||
|
||||
def reset_password
|
||||
user = Marshal.load(Base64.decode64(params[:user])) unless params[:user].nil?
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class SessionsController < ApplicationController
|
||||
skip_before_filter :has_info
|
||||
skip_before_filter :authenticated, :only => [:new, :create]
|
||||
skip_before_action :has_info
|
||||
skip_before_action :authenticated, :only => [:new, :create]
|
||||
|
||||
def new
|
||||
@url = params[:url]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class TutorialsController < ApplicationController
|
||||
skip_before_filter :has_info
|
||||
skip_before_filter :authenticated
|
||||
skip_before_action :has_info
|
||||
skip_before_action :authenticated
|
||||
|
||||
def credentials
|
||||
render :partial => "layouts/tutorial/credentials/creds"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class UsersController < ApplicationController
|
||||
skip_before_filter :has_info
|
||||
skip_before_filter :authenticated, :only => [:new, :create]
|
||||
skip_before_action :has_info
|
||||
skip_before_action :authenticated, :only => [:new, :create]
|
||||
|
||||
def new
|
||||
@user = User.new
|
||||
|
||||
Reference in New Issue
Block a user