Bala Paranj
2006-Nov-13 20:39 UTC
Rails Plugins - Extending Rails Beyond the Core Question
The book says "You can also use init.rb to ensure that this module is mixed in to all your controllers" vendor/plugins/breadcrumbs/init.rb ActionController::Base.send :include, Breadcrumbs What does the Base.send mean? TIA. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Pat Maddox
2006-Nov-13 20:48 UTC
Re: Rails Plugins - Extending Rails Beyond the Core Question
On 11/13/06, Bala Paranj <bcparanj-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > The book says "You can also use init.rb to ensure that this module is mixed > in to all your controllers" > > vendor/plugins/breadcrumbs/init.rb > ActionController::Base.send :include, BreadcrumbsActionController::Base is the base controller class. send simply sends a message, and in this case it''s sending the include message with the parameter Breadcrumbs. It''s the same as if you did class ActionController::Base include Breadcrumbs end You have to use send or the class form because include is a private method. Pat --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---