Class: Model

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document
Defined in:
app/models/model.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.find_all_by_id(ids, _ = {}) ⇒ Object



12
13
14
# File 'app/models/model.rb', line 12

def self.find_all_by_id ids, _ = {}
  Model.where(:id.in => ids)
end

Instance Method Details

#get(key) ⇒ Object



16
17
18
# File 'app/models/model.rb', line 16

def get (key)
  self.spec_values.try(:[], key)
end