We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
This is well explained in this list post.
Just define constants containing your database connections :
BLOG_DB = Sequel.sqlite('data/blog/blog.db') COMMENTS_DB = Sequel.sqlite('data/blog/comments.db')
Then, use self.db to set the database connection to use in your model :
self.db
class Blog < Sequel::Model self.db = BLOG_DB ... end class BlogComment < Sequel::Model self.db = COMMENTS_DB ... end
Alternatively, you can set the database connection like this :
class Blog < Sequel::Model(BLOG_DB) ... end class BlogComment < Sequel::Model(COMMENTS_DB) ... end