Class: Anoubis::Tenant::SystemLocale

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

Overview

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

Instance Attribute Summary collapse

Instance Attribute Details

#localeLocales

Returns reference to locale.

Returns:

  • (Locales)

    reference to locale



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

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

#systemSystem

Returns reference to the Anoubis::Tenant::System model.

Returns:



13
# File 'app/models/anoubis/tenant/system_locale.rb', line 13

belongs_to :system, :class_name => 'Anoubis::Tenant::System'

#titleString

Returns the system's localized title.

Returns:

  • (String)

    the system's localized title



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

validates :title, length: { minimum: 3, maximum: 100 }, uniqueness: { scope: [:system_id, :locale] }