Sorry, this answer was completely wrong (misunderstood your problem):
Your destruction code may be as follows:
def destroy @product = Product.find(params[:id]) @product.destroy redirect_to <route method for vendor products index>, :notice => 'Any message' end
See the exact route routing routes in your terminal.
params [: vendor_id] should also be available.
user668531
source share