Re: [rspec-users] Unable to post to an update action in a controller spec

2009-05-14 Thread Zach Dennis
On Thu, May 14, 2009 at 6:23 AM, Fernando Perez wrote: >> put :update, :item => 1 etc. >> > I tried that but didn't work. I managed to get it working by simply > doing: > > post :update, {:id => 'dummy', :item => {'1' => ...}} > > For some reason, I previously tried with :id => 'update' but Rails

Re: [rspec-users] Unable to post to an update action in a controller spec

2009-05-14 Thread Fernando Perez
> put :update, :item => 1 etc. > I tried that but didn't work. I managed to get it working by simply doing: post :update, {:id => 'dummy', :item => {'1' => ...}} For some reason, I previously tried with :id => 'update' but Rails didn't like it. -- Posted via http://www.ruby-forum.com/. _

Re: [rspec-users] Unable to post to an update action in a controller spec

2009-05-13 Thread BJ Clark
On May 13, 2009, at 1:42 PM, Fernando Perez wrote: Hi, I use restful routes. In one of my views I have a form that looks like: <%- form_tag '/items/update', :method => :put do -%> ... <%= submit_tag "Recalculate" %> <%- end -%> I know I cheated a bit, as I should be submitting to /items

[rspec-users] Unable to post to an update action in a controller spec

2009-05-13 Thread Fernando Perez
Hi, I use restful routes. In one of my views I have a form that looks like: <%- form_tag '/items/update', :method => :put do -%> ... <%= submit_tag "Recalculate" %> <%- end -%> I know I cheated a bit, as I should be submitting to /items/1 instead. Anyway, now how can I trigger the update act