Class: Jobshop::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Includes:
Pundit
Defined in:
app/controllers/jobshop/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#layout_for_applicationObject

def not_authenticated

  flash[:alert] = "Please sign in."
  redirect_to(request.referrer || main_app.root_path)
end


19
20
21
22
23
24
25
# File 'app/controllers/jobshop/application_controller.rb', line 19

def layout_for_application
  if devise_controller? && controller_name == "sessions"
    "jobshop/unauthenticated"
  else
    "jobshop/application"
  end
end