Class: Anoubis::Tenant::MenuLocale

Inherits:
Core::ApplicationRecord 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

Attributes inherited from Core::ApplicationRecord

#can_delete, #can_edit, #can_new, #created_at, #current_user, #need_refresh, #redis, #sys_title, #updated_at

Method Summary

Methods inherited from Core::ApplicationRecord

#after_initialize_core_anubis_model, #can_destroy?, #current_locale, #current_locale=, #default_locale, #get_locale, #get_locale_field, get_where, #is_field_localized, #new_uuid, redis, #redis_prefix, redis_prefix, #set_locale_field

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 Anoubis::Tenant::Menu model.

Returns:



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 }