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