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

Version Path
muck-engine-0.1.31 app/models/language.rb
muck-engine-0.1.24 app/models/language.rb
muck-engine-0.1.25 app/models/language.rb
muck-engine-0.1.26 app/models/language.rb
muck-engine-0.1.27 app/models/language.rb
muck-engine-0.1.28 app/models/language.rb
muck-engine-0.1.29 app/models/language.rb
muck-engine-0.1.30 app/models/language.rb
muck-engine-0.1.18 app/models/language.rb
muck-engine-0.1.19 app/models/language.rb
muck-engine-0.1.20 app/models/language.rb
muck-engine-0.1.21 app/models/language.rb
muck-engine-0.1.22 app/models/language.rb
muck-engine-0.1.23 app/models/language.rb