Changed authorize to authorize_user!
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class ApplicationController < ActionController::Base
|
||||
before_action :set_current_request_details
|
||||
before_action :authenticate
|
||||
before_action :authenticate_user!
|
||||
|
||||
private
|
||||
def current_user
|
||||
@@ -19,7 +19,7 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
helper_method :user_signed_in?
|
||||
|
||||
def authenticate
|
||||
def authenticate_user!
|
||||
unless user_signed_in?
|
||||
redirect_to sign_in_path
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class HomeController < ApplicationController
|
||||
skip_before_action :authenticate
|
||||
skip_before_action :authenticate_user!
|
||||
def index
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
class Identity::EmailVerificationsController < ApplicationController
|
||||
skip_before_action :authenticate, only: :show
|
||||
|
||||
skip_before_action :authenticate_user!, only: :show
|
||||
before_action :set_user, only: :show
|
||||
|
||||
def show
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
class Identity::PasswordResetsController < ApplicationController
|
||||
skip_before_action :authenticate
|
||||
|
||||
skip_before_action :authenticate_user!
|
||||
before_action :set_user, only: %i[ edit update ]
|
||||
|
||||
def new
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class RegistrationsController < ApplicationController
|
||||
skip_before_action :authenticate
|
||||
skip_before_action :authenticate_user!
|
||||
|
||||
def new
|
||||
@user = User.new
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
class SessionsController < ApplicationController
|
||||
skip_before_action :authenticate, only: %i[ new create ]
|
||||
|
||||
skip_before_action :authenticate_user!, only: %i[ new create ]
|
||||
before_action :set_session, only: :destroy
|
||||
|
||||
def index
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class VehiclesController < ApplicationController
|
||||
before_action :set_vehicle, only: %i[ show edit update destroy ]
|
||||
skip_before_action :authenticate
|
||||
skip_before_action :authenticate_user!
|
||||
|
||||
# has_many_attached :images
|
||||
|
||||
|
||||
Reference in New Issue
Block a user