Don French
2008-Feb-09 00:00 UTC
ActionController::MethodNotAllowed (Only get and post requests are allowed.)
I have a restful controller that when a uri of items/1/edit is displayed and then saved, I get that message. The model is InventroyItem and the controller is InventroyItemsController. The routes.rb contains map.resources inventory_items The form uses partials and contains: <% form_for(:inventory_item, :url => inventory_item_path(@inventoryitem), :html => { :method => :put }) do | f| %> <%= render :partial => ''inventory_item'', :locals => {:f => f} %> <% end %> Any ideas? Donald French --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Don French
2008-Feb-09 21:39 UTC
Re: ActionController::MethodNotAllowed (Only get and post requests are allowed.)
bump. Any ideas, anybody? Don French On Feb 8, 7:00 pm, Don French <dhf0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have a restful controller that when a uri of items/1/edit is > displayed and then saved, I get that message. > > The model is InventroyItem and the controller is > InventroyItemsController. > The routes.rb contains map.resources inventory_items > The form uses partials and contains: > > <% form_for(:inventory_item, :url => > inventory_item_path(@inventoryitem), :html => { :method => :put }) do | > f| %> > <%= render :partial => ''inventory_item'', :locals => {:f => f} %> > <% end %> > > Any ideas? > > Donald French--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
jeroen
2008-Mar-06 11:19 UTC
Re: ActionController::MethodNotAllowed (Only get and post requests are allowed.)
Did you ever solve this? I have the same problem and I have no idea what''s causing it. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jim Mckerchar
2008-Apr-17 23:23 UTC
Re: ActionController::MethodNotAllowed (Only get and post requests are allowed.)
Don French wrote:> I have a restful controller that when a uri of items/1/edit is > displayed and then saved, I get that message. > > The model is InventroyItem and the controller is > InventroyItemsController. > The routes.rb contains map.resources inventory_items > The form uses partials and contains: > > <% form_for(:inventory_item, :url => > inventory_item_path(@inventoryitem), :html => { :method => :put }) do | > f| %> > <%= render :partial => ''inventory_item'', :locals => {:f => f} %> > <% end %> > > Any ideas? > > Donald FrenchAny solution.... I have a similar problem. But the error i get is "ActionController::MethodNotAllowed Only get requests are allowed." I had this problem a couple of months ago.... and found a solution. But for the life of me can''t remember what it was and where i saved it. -- 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 -~----------~----~----~----~------~----~------~--~---
Jim Mckerchar
2008-Apr-17 23:33 UTC
Re: ActionController::MethodNotAllowed (Only get and post requests are allowed.)
Ok.... I solved the problem i was having. I had a typo in my form_for this.... <% form_for @profile, :url=>person_profile_url, :html=>{:method=>:put} do |f| %> when it should have been this <% form_for :profile, @profile, :url=>person_profile_url, :html=>{:method=>:put} do |f| %> Hope this helps someone. -- 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 -~----------~----~----~----~------~----~------~--~---
Aslam Syed
2010-Feb-24 11:57 UTC
Re: ActionController::MethodNotAllowed (Only get and post re
The method used is by default POST. You can also specify GET or you can simulate PUT or DELETE over POST. All specified with options[:method] link_to_remote "Destroy", :url => edit_person_url(@person), :method => :get -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.