Module: SolidusAdmin::LayoutHelper

Defined in:
app/helpers/solidus_admin/layout_helper.rb

Overview

Helpers for the admin layout

Instance Method Summary collapse

Instance Method Details

#current_locale(backend: I18n) ⇒ Symbol

Returns:

  • (Symbol)


7
8
9
# File 'app/helpers/solidus_admin/layout_helper.rb', line 7

def current_locale(backend: I18n)
  backend.locale
end

#solidus_admin_title(store_name: current_store.name, controller_name: self.controller_name) ⇒ String

Returns HTML title.

Parameters:

  • store_name (String) (defaults to: current_store.name)
  • controller_name (String) (defaults to: self.controller_name)

Returns:

  • (String)

    HTML title



14
15
16
# File 'app/helpers/solidus_admin/layout_helper.rb', line 14

def solidus_admin_title(store_name: current_store.name, controller_name: self.controller_name)
  "#{store_name} - #{t("solidus_admin.#{controller_name}.title")}"
end