In my app I have model helpers with the same names, such that each controller should be calling the correct helper within its own helper''s namespace. Isn''t this the expected behavior? It appears that when I call a helper it''s picking the module that is alphabetically last which is for a different model/controller alltogether. I''m using Rails 2.0.2. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
doug316 wrote:> In my app I have model helpers with the same names, such that each > controller should be calling the correct helper within its own > helper''s namespace. Isn''t this the expected behavior? > > It appears that when I call a helper it''s picking the module that is > alphabetically last which is for a different model/controller > alltogether. > > I''m using Rails 2.0.2.This is what is at the top of application_controller.rb by default: class ApplicationController < ActionController::Base helper :all # include all helpers, all the time So, all files in the load path with the glob form *_helper.rb are automatically loaded in Rails 2.0 -- 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 -~----------~----~----~----~------~----~------~--~---
Thanks!! On Apr 9, 11:58 am, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> doug316 wrote: > > In my app I have model helpers with the same names, such that each > > controller should be calling the correct helper within its own > > helper''s namespace. Isn''t this the expected behavior? > > > It appears that when I call a helper it''s picking the module that is > > alphabetically last which is for a different model/controller > > alltogether. > > > I''m using Rails 2.0.2. > > This is what is at the top of application_controller.rb by default: > > class ApplicationController < ActionController::Base > helper :all # include all helpers, all the time > > So, all files in the load path with the glob form *_helper.rb are > automatically loaded in Rails 2.0 > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---