Closed contentfree closed 10 years ago
Thanks for the note. Is there an alternative way to get the same thing done? I haven't used Sequel for years but am happy to update this if so. If not, is this whole gem then deprecated from what you can tell?
Far as I can tell you don't have to do anything besides include the gem, Sequel::Model.plugin :polymorphic
and use :polymorphic or :as in the association. I'll try to confirm, but all I did is remove the is
usage to get mine to run.
Both is lines should go? What about the top one that doesn't say anything else about polymorphic? Intuitively it feels like something should be needed there, no?
Not needed in either case. The to overrides from the plugin appear to do everything needed (after you've included the plugin in the model…)
Removed. Thanks Dave!
It looks like there's a syntax error in the many_to_one class_eval block. I think model = self.class.to_s.downcase
should probably just be model = self.to_s.downcase
... trying that now.
(I know you're not maintaining this anymore... but I thought I'd document this here, at least)
Pretty straightforward: The example in the readme uses
is :polymorphic
and that's no longer valid. Bit me (as a newb to Sequel).