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

Zach Dennis zach.dennis at gmail.com
Thu May 14 20:19:20 EDT 2009

On Thu, May 14, 2009 at 6:23 AM, Fernando Perez <lists at ruby-forum.com> 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
> didn't like it.

I don't get the impression you're very familiar with RESTful routing
in Rails. You may want to look read about it in the Agile Web
Development w/Rails book and/or Rails guides:


It should give you a better overview of when/where to use ids, puts, posts, etc.

> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Zach Dennis
http://www.continuousthinking.com (personal)
http://www.mutuallyhuman.com (hire me)
@zachdennis (twitter)

More information about the rspec-users mailing list