Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use "use_database" when not authorized to create new databases? #197

Open
niuage opened this issue Jan 7, 2016 · 0 comments

Comments

@niuage
Copy link

niuage commented Jan 7, 2016

My model:

class Team < CouchRest::Model::Base
  use_database "teams"
end

use_database calls prepare_database, which calls self.server.database!(db).
I'm using the Cloudant service, and I'm authenticating with an api key + password. This key only has rights on an existing database, it can't create new ones. So self.server.database!(db) fails, even though the db already exists.

How can I get around that? Overriding Team.database seems to work, but I'd rather not have to do that.

Thanks.

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

No branches or pull requests

1 participant