I created simple scaffold, it has the destroy method with
respond_to do |format|
format.html { redirect_to :action => "index", :status => 302 }
format.json { head :ok }
end
end
when I click “Destroy”, I see the page with words “You are being redirected.” where word “redirected” is link to the posts_path. what should i do to fix this bug?
I would pull out the
:status => 302' option and double check that my Destroy link has:method => ‘delete’set. If the:method` isn’t set on the link then you will be redirected to your index action.