Sha256: 0a4d035e4052d7be795e99be6036ccf033fe9880999f05af69ab6c3a6cc17dee

Contents?: true

Size: 299 Bytes

Versions: 10

Compression:

Stored size: 299 Bytes

Contents

class Language < ActiveRecord::Base

  def self.locale_id
    languages = Language.find(:all, :select => 'id, locale', :conditions => '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

10 entries across 10 versions & 1 rubygems

Version Path
muck-engine-0.1.8 app/models/language.rb
muck-engine-0.1.9 app/models/language.rb
muck-engine-0.1.10 app/models/language.rb
muck-engine-0.1.11 app/models/language.rb
muck-engine-0.1.12 app/models/language.rb
muck-engine-0.1.13 app/models/language.rb
muck-engine-0.1.14 app/models/language.rb
muck-engine-0.1.15 app/models/language.rb
muck-engine-0.1.16 app/models/language.rb
muck-engine-0.1.17 app/models/language.rb