Sha256: e3ed9fdb64bcb57fa9b980f7d1432114e2d98978c966f3040e75d5b422a9bf43
Contents?: true
Size: 878 Bytes
Versions: 7
Compression:
Stored size: 878 Bytes
Contents
# Parts of this class borrowed from: # https://gist.github.com/josevalim/fb706b1e933ef01e4fb6 # Thank you Jose Valim! module Jobshop class ApplicationController < ActionController::Base include Pundit layout :layout_for_application protect_from_forgery before_action EmailTokenValidation before_action :authenticate_user! # after_action :verify_authorized, except: :index # after_action :verify_policy_scoped, only: :index def after_sign_in_path_for(resource_or_scope) if !resource_or_scope.onboard? team_setup_path else super end end private def layout_for_application if devise_controller? && controller_name == "sessions" || controller_path == "jobshop/teams/lookups" "jobshop/unauthenticated" else "jobshop/application" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems