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.
My model:
use_databasecallsprepare_database, which callsself.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.databaseseems to work, but I'd rather not have to do that.Thanks.