Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

There should be a nice DSL for self.default_repository_name #292

Open
muescha opened this issue Mar 5, 2016 · 1 comment
Open

There should be a nice DSL for self.default_repository_name #292

muescha opened this issue Mar 5, 2016 · 1 comment

Comments

@muescha
Copy link

muescha commented Mar 5, 2016

current (very undocumented):

def self.default_repository_name
  :alternate
end

whould be nice to have a DSL repository

class Client
  include DataMapper::Resource

  repository :alternate

  property :id,   Serial
  property :name, String
end

and a DataMapper.repository block should also set the default repository name:

DataMapper.repository(:alternate) { 
  class Client
    include DataMapper::Resource

    property :id,   Serial
    property :name, String
  end
}
@tpitale
Copy link
Member

tpitale commented May 24, 2016

PR for documentation would be appreciated. But, given the state of maintenance on the project, I doubt a change to the way this works is likely.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants