app/models/anoubis/application_record.rb
##
# Returns true if field has localized data
# @param field [String] Field identifier
# @param used_locale [String | nil] Locale identifier (by default used {current_locale})
# @return [Boolean] true if field has localized data
Returns true if field has localized data
Returns true if field has localized data
def is_field_localized(field, used_locale = nil)
    field = field.to_s.to_sym
    used_locale = current_locale.to_s unless used_locale
    return false unless self[field]
    return true if self[field].key? used_locale
    false
  end
def is_field_localized ( field , used_locale = nil ) field = field . to_s . to_sym used_locale = current_locale . to_s unless used_locale return false unless self [ field ] return true if self [ field ] . key? used_locale false end
Returns true if field has localized data
Returns true if field has localized data
true if field has localized data
true if field has localized data
Boolean
field
None
used_locale
Locale identifier (by default used {current_locale})
Locale identifier ( by default used { current_locale } )