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 from http://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.
