On Tue, Sep 1, 2009 at 6:23 AM, Anderson Mesquita<[email protected]> wrote: > Hi all, > > I was wondering if it is possible to dynamically chain class methods in > rails. Suppose there are several optional methods that a class may have, I > want to chain call all the methods that apply to a certain class. Is it > possible? What is the best approach to do achieve this?
ActiveSupport defined Module#alias_method_chain which is used extensively to do what I think you are asking for. Googling alias_method_chain should fill you in on the details. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

