Class: Noah::Applications

Inherits:
Object
  • Object
show all
Defined in:
lib/noah/models/applications.rb

Class Method Summary collapse

Class Method Details

.all(options = {}) ⇒ Object



44
45
46
47
48
49
# File 'lib/noah/models/applications.rb', line 44

def self.all(options = {})
  app_hash = Hash.new
  options.empty? ? apps=Application.all.sort : apps=Application.find(options).sort
  apps.each {|x| app_hash["#{x.name}"] = x.to_hash.reject {|k,v| k == :name} }
  app_hash
end