Please modify the actual action 'delete' in following manner.
@products = Product.find(:all)
mytest.destroy if mytest
Hello Amit, Thank you for your answer, but I don't understand how the delete method will understand the difference that I want to delete only one or all.
also I don't want this change be transparent for the previous calls to delete. Any idea?
Is this something you are looking for?
all = params[:all] || 'false'
if all == 'true'
# delete all