class Para::I18n::AttributeTranslation::Base

Attributes

attribute[R]
locale[R]
model[R]

Public Class Methods

new(locale, model, attribute) click to toggle source
# File lib/para/i18n/attribute_translation/base.rb, line 7
def initialize(locale, model, attribute)
  @locale = locale.to_s
  @model = model
  @attribute = attribute.to_s
end

Public Instance Methods

default_locale?() click to toggle source
# File lib/para/i18n/attribute_translation/base.rb, line 13
def default_locale?
  @default_locale ||= locale == I18n.default_locale.to_s
end
fallback_locale() click to toggle source
# File lib/para/i18n/attribute_translation/base.rb, line 17
def fallback_locale
  @fallback_locale ||= Para::I18n::Fallbacks.i18n_fallback_for(locale.to_sym)
end