On Jun 2, 8:59 pm, dusty <[EMAIL PROTECTED]> wrote: > I'm having trouble getting my models to load up with sequel 2.0 and > not_naughty 0.5.1 downloaded from rubyforge. It appears there has > been some interface changes and not_naughty might need to be updated. > > Here is the error I get > > NoMethodError: undefined method `def_hook_method' for Tester:Class > from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/not_naughty-0.5.1/lib/ > sequel_not_naughty.rb:88:in `included' > from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/not_naughty-0.5.1/lib/ > sequel_not_naughty.rb:87:in `instance_eval' > from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/not_naughty-0.5.1/lib/ > sequel_not_naughty.rb:87:in `included' > from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/not_naughty-0.5.1/lib/ > sequel_not_naughty.rb:76:in `include' > from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/not_naughty-0.5.1/lib/ > sequel_not_naughty.rb:76:in `send!' > from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/not_naughty-0.5.1/lib/ > sequel_not_naughty.rb:76:in `apply' > from /opt/ruby-1.8.7/lib/ruby/gems/1.8/gems/sequel-2.0.0/lib/ > sequel_model/plugins.rb:25:in `is' > from ./tester.rb:14 > from (irb):1:in `require' > from (irb):1 > > Has def_hook_method recently been dropped?
I don't think it is used any more. Hooks methods are defined via: instance_eval("def #{hook}(method = nil, &block); add_hook(:#{hook}, method, &block) end") not_naughty probably needs to be updated. Note that if the only reason you are using not_naughty is for conditional feature (:if option), that's going to be added to the default validations fairly soon. dtsato has a branch at github that implements it, I'll be merging it after I have some more time to review it and test it. Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to sequel-talk@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---