<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -56,6 +56,7 @@ module ResourceController
           destroy do
             flash &quot;Successfully removed!&quot;
             wants.html { redirect_to collection_url }
+            failure.wants.html { redirect_to object_url }
           end
           
           class &lt;&lt; self
@@ -66,4 +67,4 @@ module ResourceController
         end
       end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/resource_controller/controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,4 +15,14 @@ class ProjectsControllerTest &lt; ActionController::TestCase
   should_be_restful do |resource|
     resource.formats = [:html]
   end
+
+  context &quot;on DELETE to :destroy that fails&quot; do
+    setup do
+      Project.any_instance.stubs(:destroy).returns(false)
+      delete :destroy, :id =&gt; @project.to_param
+    end
+
+    should_respond_with :redirect
+    should_redirect_to &quot;project_url(@project)&quot;
+  end
 end</diff>
      <filename>test/test/functional/projects_controller_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>defdce1a6f83edddbfca7260edcf6deed1381fa9</id>
    </parent>
  </parents>
  <author>
    <name>James Golick</name>
    <email>james@giraffesoft.ca</email>
  </author>
  <url>http://github.com/giraffesoft/resource_controller/commit/df5826256a843b747270bc3eb67ff90d68bc4be7</url>
  <id>df5826256a843b747270bc3eb67ff90d68bc4be7</id>
  <committed-date>2009-05-31T10:00:33-07:00</committed-date>
  <authored-date>2009-05-31T10:00:33-07:00</authored-date>
  <message>add a default response for destroy_fails</message>
  <tree>83ef86f0bb1c09f7ea8cdb6db6da4130ef812f9c</tree>
  <committer>
    <name>James Golick</name>
    <email>james@giraffesoft.ca</email>
  </committer>
</commit>
