Class: Backend::BaseController

Inherits:
ActionController::Base
  • Object
show all
Includes:
Udongo::Cryptography
Defined in:
app/controllers/backend/base_controller.rb

Instance Method Summary collapse

Methods included from Udongo::Cryptography

#crypt

Instance Method Details



7
8
9
# File 'app/controllers/backend/base_controller.rb', line 7

def breadcrumb
  @breadcrumb ||= Udongo::Breadcrumb.new
end

#current_adminObject



12
13
14
# File 'app/controllers/backend/base_controller.rb', line 12

def current_admin
  @current_admin ||= Admin.find(session[:admin_id]) if session[:admin_id]
end

#default_app_localeObject



21
22
23
# File 'app/controllers/backend/base_controller.rb', line 21

def default_app_locale
  Udongo.config.i18n.app.default_locale
end

#translate_notice(notice, actor = nil) ⇒ Object



17
18
19
# File 'app/controllers/backend/base_controller.rb', line 17

def translate_notice(notice, actor = nil)
  Udongo::Notification.new(notice).translate(actor)
end