Module: SiteModel
Instance Method Summary
collapse
Methods included from MongoModel
#collection
#embed_many, #embed_one, #field, #fields, #many, #modify_field, #one, #remove_field
Instance Method Details
#load(site, values) ⇒ Object
14
15
16
|
# File 'lib/yodel/models/core/model/site_model.rb', line 14
def load(site, values)
new(site, values)
end
|
#scoped(site, constructor, scope = {}) ⇒ Object
10
11
12
|
# File 'lib/yodel/models/core/model/site_model.rb', line 10
def scoped(site, constructor, scope={})
Query.new(constructor, site, collection, scope)
end
|
#scoped_for(site, scope = {}) ⇒ Object
6
7
8
|
# File 'lib/yodel/models/core/model/site_model.rb', line 6
def scoped_for(site, scope={})
scoped(site, self, scope.merge({_site_id: site.id}))
end
|