What is the appropriate respond_with line for a nested resources destroy action?
My routes:
resources :vendors do
resources :products, :except => [:index]
end
Product#destroy (note @vendor and @product are found with a before_filter which is omitted here)
def destroy
@product.destroy
respond_with @vendor, @product
end
According to my functional tests, this is returning /vendors/X/products/X and not /vendors/X
Should I change it to just responed_to @vendor?
I believe Rails is smart enough to understand what to do if @product is destroyed
if not, then try this