On Dec 18, 3:36 pm, Bryan Richardson <[email protected]> wrote:
> Hello all,
>
> First off, I'd like to say thanks to the developers of Sequel... I
> find it much less 'klunky' than ActiveRecord! :)
>
> As outlined in Sequel's README file, I attempted to pass the name of
> the database table I wanted a particular model to use as an argument
> to Sequel::Model, like so:
>
> class Traffic < Sequel::Model(:traffic)
>
> When I did this, I got the following error:
>
> sequel_model/base.rb:124:in `db': No database associated with
> Sequel::Model (Sequel::Error)
>
> If I don't pass the name of the table as an argument to Sequel::Model,
> the error goes away.  Any idea why this is happening?

You should always have a database connection before instantiating a
Sequel::Model class.  The reason you don't get an error without a
table name is an implementation detail, which I probably should fix.

Jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to