I'm working on a plugin that will include allow users to selectively apply a method to :before_save (or other ActiveRecord callbacks, if specified).

        before_save :some_action

This works, but I'd like to allow plugin users to choose their own callback. Of course, I can do a big fat case statement, but is there a way to use a string to set the method name?

        {callback_string.convert_to_method} :some_action

Any ideas?

-- Patrick




_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to