Posting here as it applies to RC1, apologies if it should be in the main rails list. I''m trying RC1 out and have found that I can''t call any methods from my application controller now. For example, I have a method called main_login in ApplicationController and when I attempt to access via url as application/main_login, I get the follow error... no route found to match "/application/main_login" with {:method=>:get} I''ve found that all my application controller methods produce the same result. Has something been deprecated that I''m unaware of or am I missing something obvious (based on the info here) and just doing something stupid? Do I have to "upgrade" my routes.rb file or something? Thanks, Andrew --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2006-Nov-28 22:46 UTC
Re: application controller methods and routes (RC1)
> no route found to match "/application/main_login" with {:method=>:get} > > I''ve found that all my application controller methods produce the same > result. Has something been deprecated that I''m unaware of or am I > missing something obvious (based on the info here) and just doing > something stupid? >I don''t believe it was ever the intention to route to actions on the application controller (which are also available on all other controllers). ApplicationController was only really intended for before_filters, utility methods and the like. It seems the new routing code enforces that. -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On 29/11/2006, at 9:46 AM, Michael Koziarski wrote:> >> no route found to match "/application/main_login" with >> {:method=>:get} >> >> I''ve found that all my application controller methods produce the >> same >> result. Has something been deprecated that I''m unaware of or am I >> missing something obvious (based on the info here) and just doing >> something stupid? >> > > I don''t believe it was ever the intention to route to actions on the > application controller (which are also available on all other > controllers). ApplicationController was only really intended for > before_filters, utility methods and the like. > > It seems the new routing code enforces that.Though really the ApplicationController is just any old ActionController that your others inherit from by default. I don''t believe your controllers need to inherit from ApplicationController, so standing by itself it should be ok to route to it. In saying that, though, if you''re doing this on a standard Rails app then you''re probably doing something wrong. -- tim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Ok, I can live with that, but this might be something that should be made a little, ok, a lot more obvious in the upgrade path notes... on the weblog, etc. Since I''ve never seen/read anything that discourages calling methods on the ApplicationController, I''m sure I''m not the first to have done it. Andrew On 11/28/06, Michael Koziarski <michael@koziarski.com> wrote:> > > no route found to match "/application/main_login" with {:method=>:get} > > > > I''ve found that all my application controller methods produce the same > > result. Has something been deprecated that I''m unaware of or am I > > missing something obvious (based on the info here) and just doing > > something stupid? > > > > I don''t believe it was ever the intention to route to actions on the > application controller (which are also available on all other > controllers). ApplicationController was only really intended for > before_filters, utility methods and the like. > > It seems the new routing code enforces that. > > -- > Cheers > > Koz > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2006-Nov-28 23:34 UTC
Re: application controller methods and routes (RC1)
> > Ok, I can live with that, but this might be something that should be > made a little, ok, a lot more obvious in the upgrade path notes... on > the weblog, etc.Yeah, this is definitely worth mentioning in the upgrade guide. -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---