Class: Anoubis::Tenant::MenuLocale

Inherits:
Core::ApplicationRecord
  • Object
show all
Defined in:
app/models/anoubis/tenant/menu_locale.rb

Overview

Localization for Menu model. Model stores all translations for Menu model.

Instance Attribute Summary collapse

Instance Attribute Details

#localeLocales

Returns reference to locale.

Returns:

  • (Locales)

    reference to locale



26
# File 'app/models/anoubis/tenant/menu_locale.rb', line 26

enum locale: Anoubis::Core::Locales.enums

Returns reference to the Menu model.

Returns:

  • (Menu)

    reference to the Menu model



9
# File 'app/models/anoubis/tenant/menu_locale.rb', line 9

belongs_to :menu, :class_name => 'Anoubis::Tenant::Menu'

#page_titleString

Returns the menu's localized page title. Uses in frontend application.

Returns:

  • (String)

    the menu's localized page title. Uses in frontend application.



18
# File 'app/models/anoubis/tenant/menu_locale.rb', line 18

validates :page_title,  presence: true, length: { minimum: 3, maximum: 200 }

#short_titleString

Returns the menu's localized short title. Uses in frontend application.

Returns:

  • (String)

    the menu's localized short title. Uses in frontend application.



22
# File 'app/models/anoubis/tenant/menu_locale.rb', line 22

validates :short_title,  length: { maximum: 200 }

#titleString

Returns the menu's localized title.

Returns:

  • (String)

    the menu's localized title



14
# File 'app/models/anoubis/tenant/menu_locale.rb', line 14

validates :title,  presence: true, length: { minimum: 3, maximum: 100 }