Class: Language
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Language
- Defined in:
- app/models/language.rb
Overview
Schema Information
Table name: languages
id :integer not null, primary key
name :string(255)
english_name :string(255)
locale :string(255)
supported :boolean default(TRUE)
is_default :integer default(0)
Constant Summary collapse
- @@locale_ids =
nil
Class Method Summary collapse
Class Method Details
.locale_id ⇒ Object
17 18 19 20 |
# File 'app/models/language.rb', line 17 def self.locale_id cache_locale_ids @@locale_ids[I18n.locale] end |
.supported_locale?(locale) ⇒ Boolean
22 23 24 25 |
# File 'app/models/language.rb', line 22 def self.supported_locale? locale cache_locale_ids @@locale_ids[locale.to_sym] != nil end |