Sha256: e9dc378b224d2e87ab48f52fb25898fb1dc91d9998034232eccd7d1fd4763483
Contents?: true
Size: 729 Bytes
Versions: 4
Compression:
Stored size: 729 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # The main application controller that inherits from Rails. class ApplicationController < ActionController::Base include NeedsOrganization include NeedsAuthorization include FormFactory include LocaleSwitcher protect_from_forgery with: :exception, prepend: true def user_not_authorized_path decidim_admin.root_path end # Overwrites `cancancan`'s method to point to the correct ability class, # since the gem expects the ability class to be in the root namespace. def current_ability @current_ability ||= Decidim::Admin::Abilities::Base.new(current_user) end end end end
Version data entries
4 entries across 4 versions & 2 rubygems