On Mar 16, 2:56 pm, Jeremy Evans <[email protected]> wrote: > On Mar 16, 10:48 am, Nels Nelson <[email protected]> wrote: > > I get the following error when I opt _not_ to use the > > class_table_inheritance plugin. > > > in `set_restricted': method name= doesn't exist or access is > > restricted to it (Sequel::Error) > > > However, when I opt _for_ using the class_table_inheritance plugin, > > everything works as expected. > > > Here's an example of when everything works:https://gist.github.com/872825 > > > Comment out lines 45 and 47 to cause the error I am encountering. > > > I'm having trouble understanding what exactly the plugin is doing that > > makes everything work -- and how can I do it myself, without using the > > plugin? > > Try defining the Sequel::Model subclass after running the migration > instead of before. If you still have errors, report back. > > Thanks, > Jeremy
Jeremy, thank you. That was the problem. As for my question: what exactly the plugin is doing that makes everything work -- and how can I do it myself, without using the plugin? I'm trying to look at the source code for Sequel::Model::ClassMethods.plugin to see if there's some easy routine I can explicitly apply post-migration-application to my pre-migration- application-defined models. That the current situation (of having to define one's models strictly after a migration) is by design is recognizable, but I am having trouble understanding it. This makes me want to try to work around it for the purposes of my application. Thanks again for your time, -Nels -- 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.
