Module: ActiveRecord::Acts::MuckLanguage::SingletonMethods

Defined in:
lib/active_record/acts/muck_language.rb

Overview

class methods

Instance Method Summary collapse

Instance Method Details

#locale_id(refresh_ids = false) ⇒ Object



18
19
20
21
# File 'lib/active_record/acts/muck_language.rb', line 18

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

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

Returns:

  • (Boolean)


23
24
25
26
# File 'lib/active_record/acts/muck_language.rb', line 23

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