Dear all, After the release of 2.3 I immediately updated my app. However routing does no longer seem to work for me. I have no idea how this can happen but as soon as I POST to, for example, the forums_path, the request gets routed to ForumsController#index instead of ForumsController#create. The same happens with nested resources. Eg POST to forums/1/topics leads to a POST in the ForumsController#1 with params "id" => "topics" I''m using these plugins which might mess up the routing: acts_as_list ar_fixtures attachment_fu_hacks mimetype-fu restful_authentication smurf acts_as_tree attachment_fu hoptoad_notifier newrelic_rpm role_requirement Any help would be great. Harm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Tue, Mar 17, 2009 at 1:27 AM, harm <harmaarts-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Dear all, > > After the release of 2.3 I immediately updated my app. However routing > does no longer seem to work for me. I have no idea how this can happen > but as soon as I POST to, for example, the forums_path, the request > gets routed to ForumsController#index instead of > ForumsController#create. The same happens with nested resources. Eg > POST to forums/1/topics leads to a POST in the ForumsController#1 with > params "id" => "topics" > > I''m using these plugins which might mess up the routing: > acts_as_list > ar_fixtures > attachment_fu_hacks > mimetype-fu > restful_authentication > smurf > acts_as_tree > attachment_fu > hoptoad_notifier > newrelic_rpm > role_requirement > > Any help would be great. > > HarmHi, there''s no certainty that plugins are compatible from release to release. If the plugin author hasn''t upgraded the plugin for a release, then you have two choices: a) wait for the author to update the plugin b) fix it yourself From the list that appears above, do you know for certain which plugin is causing the problem? -Conrad --~--~---------~--~----~------------~-------~--~----~ 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 don''t think the problem is in the plugins. The only one involved in routing is the new_relic plugin and removing that one is not helping. I was just providing this information as a possible inroad. So far I tried the following: - My environments.rb file is basically the same as the one in a new project. - My routes.rb file is being read properly. - ''rake routes'' returns the usual set of routes. - Running the server with webrick iso mongrel does not help. Any other hints? Harm On Mar 17, 9:46 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Mar 17, 2009 at 1:27 AM, harm <harmaa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Dear all, > > > After the release of 2.3 I immediately updated my app. However routing > > does no longer seem to work for me. I have no idea how this can happen > > but as soon as I POST to, for example, the forums_path, the request > > gets routed to ForumsController#index instead of > > ForumsController#create. The same happens with nested resources. Eg > > POST to forums/1/topics leads to a POST in the ForumsController#1 with > > params "id" => "topics" > > > I''m using these plugins which might mess up the routing: > > acts_as_list > > ar_fixtures > > attachment_fu_hacks > > mimetype-fu > > restful_authentication > > smurf > > acts_as_tree > > attachment_fu > > hoptoad_notifier > > newrelic_rpm > > role_requirement > > > Any help would be great. > > > Harm > > Hi, there''s no certainty that plugins are compatible from release to > release. If the plugin author hasn''t upgraded the plugin for a release, > then you have two choices: > > a) wait for the author to update the plugin > b) fix it yourself > > From the list that appears above, do you know for certain which plugin is > causing the problem? > > -Conrad--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, Mar 17, 2009 at 2:04 AM, Harm <harmaarts-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I don''t think the problem is in the plugins. The only one involved in > routing is the new_relic plugin and removing that one is not helping. > I was just providing this information as a possible inroad. > So far I tried the following: > - My environments.rb file is basically the same as the one in a new > project. > - My routes.rb file is being read properly. > - ''rake routes'' returns the usual set of routes. > - Running the server with webrick iso mongrel does not help. > > Any other hints? > > Harm > > On Mar 17, 9:46 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Tue, Mar 17, 2009 at 1:27 AM, harm <harmaa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Dear all, > > > > > After the release of 2.3 I immediately updated my app. However routing > > > does no longer seem to work for me. I have no idea how this can happen > > > but as soon as I POST to, for example, the forums_path, the request > > > gets routed to ForumsController#index instead of > > > ForumsController#create. The same happens with nested resources. Eg > > > POST to forums/1/topics leads to a POST in the ForumsController#1 with > > > params "id" => "topics" > > > > > I''m using these plugins which might mess up the routing: > > > acts_as_list > > > ar_fixtures > > > attachment_fu_hacks > > > mimetype-fu > > > restful_authentication > > > smurf > > > acts_as_tree > > > attachment_fu > > > hoptoad_notifier > > > newrelic_rpm > > > role_requirement > > > > > Any help would be great. > > > > > Harm > > > > Hi, there''s no certainty that plugins are compatible from release to > > release. If the plugin author hasn''t upgraded the plugin for a release, > > then you have two choices: > > > > a) wait for the author to update the plugin > > b) fix it yourself > > > > From the list that appears above, do you know for certain which plugin is > > causing the problem? > > > > -Conrad >Hi, did you update your Rails configurations by executing the following: rake rails:update -Conrad> > > >--~--~---------~--~----~------------~-------~--~----~ 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 also found, that :_method => :get in link_to_remote doesn''t work anymore. That is, rails 2.3.2 doesn''t treat it as GET request, but as POST. so REST route doesn''t work --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Mar 17, 9:08 am, "ruby.freeman" <ruby.free...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I also found, that :_method => :get in link_to_remote doesn''t work > anymore. That is, rails 2.3.2 doesn''t treat it as GET request, but as > POST. so REST route doesn''t workIsn''t _method only there for those methods that browsers won''t use (eg DELETE). You should be able to make link_to_remote do an actual get rather than a fake one. Fred --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I did. :S Even GET requests go wrong. In the routes.rb: map.resources :forums, :has_many => [:topics] And doing a GET on (the existing) forums/1/topics gets routed to: Processing ForumsController#1 (for 127.0.0.1 at 2009-03-17 10:10:29) [GET] Parameters: {"id"=>"topics"} This is very strange. On Mar 17, 10:07 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Mar 17, 2009 at 2:04 AM, Harm <harmaa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I don''t think the problem is in the plugins. The only one involved in > > routing is the new_relic plugin and removing that one is not helping. > > I was just providing this information as a possible inroad. > > So far I tried the following: > > - My environments.rb file is basically the same as the one in a new > > project. > > - My routes.rb file is being read properly. > > - ''rake routes'' returns the usual set of routes. > > - Running the server with webrick iso mongrel does not help. > > > Any other hints? > > > Harm > > > On Mar 17, 9:46 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On Tue, Mar 17, 2009 at 1:27 AM, harm <harmaa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Dear all, > > > > > After the release of 2.3 I immediately updated my app. However routing > > > > does no longer seem to work for me. I have no idea how this can happen > > > > but as soon as I POST to, for example, the forums_path, the request > > > > gets routed to ForumsController#index instead of > > > > ForumsController#create. The same happens with nested resources. Eg > > > > POST to forums/1/topics leads to a POST in the ForumsController#1 with > > > > params "id" => "topics" > > > > > I''m using these plugins which might mess up the routing: > > > > acts_as_list > > > > ar_fixtures > > > > attachment_fu_hacks > > > > mimetype-fu > > > > restful_authentication > > > > smurf > > > > acts_as_tree > > > > attachment_fu > > > > hoptoad_notifier > > > > newrelic_rpm > > > > role_requirement > > > > > Any help would be great. > > > > > Harm > > > > Hi, there''s no certainty that plugins are compatible from release to > > > release. If the plugin author hasn''t upgraded the plugin for a release, > > > then you have two choices: > > > > a) wait for the author to update the plugin > > > b) fix it yourself > > > > From the list that appears above, do you know for certain which plugin is > > > causing the problem? > > > > -Conrad > > Hi, did you update your Rails configurations by executing the following: > > rake rails:update > > -Conrad > >--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
My initial hunch was correct, thank you Conrad for you pointy question on which plugin might be the culprit. The plugin ''smurf'' inserted some evil map.connects. Totally fixed it now! On Mar 17, 10:18 am, Harm <harmaa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I did. :S > Even GET requests go wrong. In the routes.rb: > map.resources :forums, :has_many => [:topics] > And doing a GET on (the existing) forums/1/topics gets routed to: > Processing ForumsController#1 (for 127.0.0.1 at 2009-03-17 10:10:29) > [GET] > Parameters: {"id"=>"topics"} > > This is very strange. > > On Mar 17, 10:07 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On Tue, Mar 17, 2009 at 2:04 AM, Harm <harmaa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I don''t think the problem is in the plugins. The only one involved in > > > routing is the new_relic plugin and removing that one is not helping. > > > I was just providing this information as a possible inroad. > > > So far I tried the following: > > > - My environments.rb file is basically the same as the one in a new > > > project. > > > - My routes.rb file is being read properly. > > > - ''rake routes'' returns the usual set of routes. > > > - Running the server with webrick iso mongrel does not help. > > > > Any other hints? > > > > Harm > > > > On Mar 17, 9:46 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > On Tue, Mar 17, 2009 at 1:27 AM, harm <harmaa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Dear all, > > > > > > After the release of 2.3 I immediately updated my app. However routing > > > > > does no longer seem to work for me. I have no idea how this can happen > > > > > but as soon as I POST to, for example, the forums_path, the request > > > > > gets routed to ForumsController#index instead of > > > > > ForumsController#create. The same happens with nested resources. Eg > > > > > POST to forums/1/topics leads to a POST in the ForumsController#1 with > > > > > params "id" => "topics" > > > > > > I''m using these plugins which might mess up the routing: > > > > > acts_as_list > > > > > ar_fixtures > > > > > attachment_fu_hacks > > > > > mimetype-fu > > > > > restful_authentication > > > > > smurf > > > > > acts_as_tree > > > > > attachment_fu > > > > > hoptoad_notifier > > > > > newrelic_rpm > > > > > role_requirement > > > > > > Any help would be great. > > > > > > Harm > > > > > Hi, there''s no certainty that plugins are compatible from release to > > > > release. If the plugin author hasn''t upgraded the plugin for a release, > > > > then you have two choices: > > > > > a) wait for the author to update the plugin > > > > b) fix it yourself > > > > > From the list that appears above, do you know for certain which plugin is > > > > causing the problem? > > > > > -Conrad > > > Hi, did you update your Rails configurations by executing the following: > > > rake rails:update > > > -Conrad--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> Isn''t _method only there for those methods that browsers won''t use (eg > DELETE). You should be able to make link_to_remote do an actual get > rather than a fake one.the question is - why rails 2.2.2 generates right JS cod for Ajax GET request, but 2.3.2 isn''t. It doesn''t matter wich exactly method I write. 2.2.2. generate correct JS code like new Ajax.Request(''/items'', {asynchronous:true, evalScripts:true, method:''get'', ... whereas 2.3.2 does this one new Ajax.Request(''/items/36497?_method=get... see the difference? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
found. now I have to write ''_method'' instead of :_method thanks to all --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
no, sorry. it still doesn''t work --~--~---------~--~----~------------~-------~--~----~ 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 am seeing this as well. Only causes problems with xml and xhr requests. Passing the _method=put on a http request works as expected. See this ticket for how you can verify the problem. I haven''t come up with a solution yet. http://rails.lighthouseapp.com/projects/8994/tickets/2289-_methodput-ignored-for-xhr-and-xml-requests On 17 Mar, 07:02, "ruby.freeman" <ruby.free...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> no, sorry. it still doesn''t work--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
the solutions is that now we have to set :method => :get in options, but not in :url hash. then it works --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---