Sha256: 25f2f2eaa16bc832100cebb21108d3b6ab885a66a5597be4c288712354b80e4f
Contents?: true
Size: 922 Bytes
Versions: 19
Compression:
Stored size: 922 Bytes
Contents
module Spina module Admin class AdminController < ActionController::Base include Spina.config.authentication.constantize include Spina::CurrentAccount, Spina::CurrentTheme helper Spina::Engine.helpers before_action :add_view_path before_action :set_admin_locale before_action :authenticate admin_section :content def current_admin_path request.fullpath[%r{/#{ Spina.config.backend_path }(.*)}, 1] end helper_method :current_admin_path private def render_flash render turbo_stream: turbo_stream.update("flash", partial: "spina/admin/shared/flash") end def set_admin_locale I18n.locale = I18n.default_locale end def add_view_path prepend_view_path Spina::Engine.root.join('app/views/spina/admin') end end end end
Version data entries
19 entries across 19 versions & 1 rubygems