Sha256: 4a2c42ce9533ca010dbaeffff93d85e8da206f907c81851c170cd514d7b10e05
Contents?: true
Size: 589 Bytes
Versions: 14
Compression:
Stored size: 589 Bytes
Contents
# == 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) # class Language < ActiveRecord::Base def self.locale_id languages = Language.find(:all, :select => 'id, locale', :conditions => 'languages.muck_raker_supported = true') @@locale_ids ||= Hash[*languages.collect {|v|[v.locale.to_sym, v.id]}.flatten] @@locale_ids[I18n.locale] end end
Version data entries
14 entries across 14 versions & 1 rubygems