Displaying 1 result from an estimated 1 matches for "share_post".
2012 Feb 07
6
nested route not receiving :id parameter within controller spec
...or: post :share
ActionController::RoutingError:
No route matches {:controller=>"posts", :action=>"share"}
# ./spec/controllers/posts_controller_spec.rb:7
My routes has:
resources :posts do
post :share, :on => :member
end
rake routes shows:
share_post POST /posts/:id/share(.:format) {:action=>"share", :controller=>"posts"}
...
Why is it ignoring the :id parameter in my test and therefore blowing up?
Thanks.
Patrick J. Collins
http://collinatorstudios.com