Module: MuckEngine::Models::MuckLanguage::ClassMethods

Defined in:
lib/muck-engine/models/language.rb

Instance Method Summary collapse

Instance Method Details

#locale_id(refresh_ids = false) ⇒ Object



8
9
10
11
# File 'lib/muck-engine/models/language.rb', line 8

def locale_id(refresh_ids = false)
  cache_locale_ids(refresh_ids)
  @@locale_ids[I18n.locale]
end

#supported_locale?(locale, refresh_ids = false) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/muck-engine/models/language.rb', line 13

def supported_locale?(locale, refresh_ids = false)
  cache_locale_ids(refresh_ids)
  @@locale_ids[locale.to_sym] != nil
end