Sha256: 0888ed4e392ba4028459e2a3c30577d0e358969550615c4211a6e8d5497dce8e
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
class ApplicationController < ActionController::Base # Turn on request forgery protection. Bear in mind that GET and HEAD requests are not checked. protect_from_forgery with: :exception, prepend: true # Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has. allow_browser versions: :modern # Ensure that a user is signed in and has completed the onboarding process. before_action :authenticate_user! before_action :ensure_onboarded # Set up the base breadcrumbs for the application (Home -> Account name) before_action :setup_base_breadcrumbs # Automatically include account_id in all URL options if it is already present in the params. # This is used to ensure that all routes are scoped to the current team. Personal account # routes are not affected. def default_url_options { account_id: params[:account_id] } end protected def setup_base_breadcrumbs add_breadcrumb helpers.irelia_icon { "fa fa-home" }, (user_signed_in? ? dashboard_path : root_path) add_breadcrumb current_account.name, dashboard_path if current_account.present? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kiqr-0.1.0.alpha1 | lib/generators/kiqr/install/templates/rails/app/controllers/application_controller.rb |