Following up on my last message (which I closed myself), I'm looking to 
create a class that extends Sequel::Model and uses the schema in a 

Here's an example:

MyDB = Sequel.connect(
              adapter:  'postgres', 
              host:     ENV['MYDB_HOST'], 
              port:     ENV['MYDB_PORT'], 
              database: ENV['MYDB_DATABASE'],
              user:     ENV['MYDB_USERNAME'],
              password: ENV['MYDB_PASSWORD']

Then, when trying to define the class using that connection:

  class Account < Sequel::Model(MyDB[:foo][:account])

This doesn't work. This does, however:

  class Account < Sequel::Model(Sequel[:foo][:account])

It seems dangerous to not specify the connection to use. Is there a way to 
do this to ensure that the data is correct?


You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sequel-talk+unsubscr...@googlegroups.com.
To post to this group, send email to sequel-talk@googlegroups.com.
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to