Hi, I stuck trying to find how to solve this: I have a 2 models (Bar1,
Bar2) which shares similar behaviour but different tables and because
of that exists a Foo class which is a Sequel model (it's a Sequel
model because I don't want to repeat validations and callbacks) from
where Bar1 and Bar2 inheritates some behaviour.

I'm using set_dataset to tell Sequel what table to use for Bar1 and
Bar2, but how can I tell to Sequel that Foo doesn't have a table?

In the IRC channel Jeremy gave me a hint, he told me I can use an
anonymous class like this:

Foo = Class.new(Sequel::Model)

I try to use this in my code like this:

Foo = Class.new(Sequel::Model)
class Foo
  ...
end

But I get this error: No dataset associated with Foo

Then I tried the following

Foo = Class.new(Sequel::Model) do
  ...
end

And this time I get this: No dataset associated with #<Class:
0x00000002d54830>

So I don't know how to work this out... Any hints?

-- 
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