Sha256: 67ed9b4e2952a1ab15c77042335ffedfa92048f93861384ddd340f9604ef0bd6
Contents?: true
Size: 756 Bytes
Versions: 1
Compression:
Stored size: 756 Bytes
Contents
class Admin::BaseController < ActionController::Base include Typus::Authentication::const_get(Typus.authentication.to_s.classify) before_filter :reload_config_and_roles before_filter :authenticate before_filter :set_locale helper_method :admin_user def user_guide; end protected def reload_config_and_roles Typus.reload! if Rails.env.development? end def set_locale I18n.locale = if admin_user && admin_user.respond_to?(:locale) admin_user.locale else Typus::I18n.default_locale end end def zero_users Typus.user_class.count.zero? end def not_allowed render :text => "Not allowed!", :status => :unprocessable_entity end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
typus-3.1.0.rc19 | app/controllers/admin/base_controller.rb |