You're right, I didn't see your comment there. In any event I'm looking for a bridge from ActiveRecord to Sequel, not prior versions of Sequel.
I've tried to faithfully reproduce the behavior of ActiveRecord, but support for inheritance is still to be added. I'll do some more testing as I exercise it on various apps. Listing it on the plugins page would be great. Perhaps a description like: "Enables ActiveRecord-compatible class-level before and after filter declarations for models with support for conditional execution" On Aug 26, 4:51 pm, Jeremy Evans <[email protected]> wrote: > On Aug 26, 1:20 pm, Scott Tadman <[email protected]> wrote: > > > I didn't know about that one, and the documentation didn't seem to > > indicate it either. A question on StackOverflow turned up nothing, > > too, so this feature isn't advertised very well, perhaps by design. > > I did mention it in your StackOverflow post (http://stackoverflow.com/ > questions/3567062/are-sequelmodel-validations-only-instance-methods), > though as a later comment you might not have seen before working on > the plugin. hook_class_methods is listed as one of the built in > plugins on the plugins page, the same way all built-in plugins > are:http://sequel.rubyforge.org/plugins.html > > > The hook_class_methods plugin doesn't support :if or :unless > > conditionals which are frequently used in ActiveRecord, and the :on > > state conditional is also missing. > > Correct. The hook_class_methods plugin wasn't designed to provide an > ActiveRecord compatible API. It was added to provide a backwards > compatible interface for people upgrading from previous versions of > Sequel to Sequel 3. > > As I mentioned in the StackOverflow post, I don't think it's a good > idea to recreate ruby syntax at a class level with symbols and blocks, > when you could do the same thing more directly in an instance method > using standard ruby syntax. > > However, Sequel is designed to be flexible, and considering that other > people may want an ActiveRecord compatible API, I'd like to link to > your plugin fromhttp://sequel.rubyforge.org/plugins.html, in the > External Plugins section. What would you like me to use as a one-line > description of your plugin? > > Thanks, > 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.
