Class: Noah::Configurations

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

Class Method Summary collapse

Class Method Details

.all(options = {}) ⇒ Object



65
66
67
68
69
70
# File 'lib/noah/models/configurations.rb', line 65

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