Class: SettingsObject

Inherits:
Object
  • Object
show all
Includes:
Ants::Id, Ants::Slug, Mongoid::Document, Mongoid::Timestamps
Defined in:
app/models/settings_object.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Ants::Id

#serializable_hash

Class Method Details

.hashObject

Class


19
20
21
# File 'app/models/settings_object.rb', line 19

def self.hash
  all.to_a.inject({}) { |h, s| h[s.title.to_sym] = s.values; h }
end

Instance Method Details

#titleObject

Slug


8
# File 'app/models/settings_object.rb', line 8

field :title

#values_attributes=(hash) ⇒ Object


14
15
16
# File 'app/models/settings_object.rb', line 14

def values_attributes= (hash)
  values = hash
end