Module: DataMapper::Resource::ClassMethods

Defined in:
lib/merb_component/resource_ext.rb

Instance Method Summary collapse

Instance Method Details

#new(attrs = {}) ⇒ Object

set scope



4
5
6
7
8
9
# File 'lib/merb_component/resource_ext.rb', line 4

def new(attrs = {})
  collection = all
  collection.repository.scope do
    super(collection.default_attributes.merge(attrs))
  end
end