Sha256: cff7cfe3a95e170a3d83f36c3e4d96ee1a2f27084a3353bc9e4f64c3700f7a41

Contents?: true

Size: 331 Bytes

Versions: 5

Compression:

Stored size: 331 Bytes

Contents

require './model/mongo_model'

module SiteModel
  include MongoModel
  
  def scoped_for(site, scope={})
    scoped(site, self, scope.merge({_site_id: site.id}))
  end
  
  def scoped(site, constructor, scope={})
    Query.new(constructor, site, collection, scope)
  end
  
  def load(site, values)
    new(site, values)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yodel-0.0.7 lib/yodel/models/core/model/site_model.rb
yodel-0.0.4 lib/yodel/models/core/model/site_model.rb
yodel-0.0.3 lib/yodel/models/core/model/site_model.rb
yodel-0.0.2 lib/yodel/models/core/model/site_model.rb
yodel-0.0.1 lib/yodel/models/core/model/site_model.rb