Hi In one of the method say require_helpers i have the code helper_constant = SomeHelper ActionController::Base.send :include, helper_constant ActionView::Base.send :include, helper_constant ActionView::Helpers::FormBuilder.send :include, helper_constant And I did not understand what actually the above does? Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
i think this topic will help you. http://www.rubycentral.com/pickaxe/tut_modules.html Section : Mixins Sijo Kg wrote:> Hi > In one of the method say > require_helpers > > i have the code > helper_constant = SomeHelper > ActionController::Base.send :include, helper_constant > ActionView::Base.send :include, helper_constant > ActionView::Helpers::FormBuilder.send :include, helper_constant > > And I did not understand what actually the above does? > > Sijo-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
and see following codes: module MyTools def run(*args) puts "let #{args.join('' '')} run" end end class TryTools #include MyTools def initialize() self.class.send :include,MyTools end end c=TryTools.new c.run("me") Roscus Farmer wrote:> i think this topic will help you. > http://www.rubycentral.com/pickaxe/tut_modules.html > Section : Mixins > > > > > Sijo Kg wrote: >> Hi >> In one of the method say >> require_helpers >> >> i have the code >> helper_constant = SomeHelper >> ActionController::Base.send :include, helper_constant >> ActionView::Base.send :include, helper_constant >> ActionView::Helpers::FormBuilder.send :include, helper_constant >> >> And I did not understand what actually the above does? >> >> Sijo-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Thanks for the reply Sijo -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---