I would like to add another after/before hook to a model dynamically. The 
way I am approaching this is as follows:

          class_eval do
            define_method(:after_validation) do |*args|
              super(*args)
              # Do something
            end
            define_method(:before_save) do |*args|
              # Do something
              super(*args)
            end
            define_method(:after_save) do |*args|
              super(*args)
              # Do something
            end
          end

However, this seems to override other after/before hooks. How can I keep 
the other hooks?

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to