<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/controllers/resource_saved_spec.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,10 +1,11 @@
-* API change: save_resource and resource_saved? deprecated
+* API change: save_resource deprecated
 
-  ActiveRecord::Base now has a saved? and attempted_save? method, which makes response_for much easier
-  to write, and leaves less artefacts in the controller instance.
+  So save_resource is now deprecated, just use resource.save
   
-  So save_resource, and resource_saved? are now deprecated, just use resource.save, and resource.saved?
-  instead.  See response_for_resources_controller if you're into response_for.
+  resource_saved? has slightly different semantics - it returns true if the record is not new and has no errors
+  
+  WTF?: save_resource used to set an instance var to track whether the resource was saved.  This is so that
+        controller can make decisions based on this outside the scope of an action (in response_for, and after_filters)
   
 * rspec compat:  Added new rake task to test that an RC controller passes the default rspec_scaffold
   controller specs.</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -575,6 +575,25 @@ Requesting /forums/2/owner using DELETE
 - should set the flash notice
 - should redirect to forums/2
 
+CommentsController#resource_saved Comment.new(&lt;invalid attrs&gt;)
+- should not be resource saved
+
+CommentsController#resource_saved Comment.new(&lt;invalid attrs&gt;).save
+- should not be resource saved
+
+CommentsController#resource_saved Comment.new(&lt;invalid attrs&gt;).save then update_attributes(&lt;valid attrs&gt;)
+- should be resource saved
+
+CommentsController#resource_saved Comment.find(&lt;id&gt;)
+- should be resource saved
+- .save should be saved
+
+CommentsController#resource_saved Comment.find(&lt;id&gt;) then update_attributes(&lt;invalid attrs&gt;)
+- should not be resource saved
+
+CommentsController#resource_saved Comment.find(&lt;id&gt;) then update_attributes(&lt;new valid attrs&gt;)
+- should be resource saved
+
 Routing shortcuts for Tags should map
 - resources_path to /tags
 - resource_path to /tags/2
@@ -768,26 +787,6 @@ UsersController handling PUT /users/dave
 UsersController handling DELETE /users/dave
 - should be unknown action
 
-(re: saved?) Comment.new(&lt;invalid attrs&gt;)
-- should not be attempted save
-- should not be saved
-
-(re: saved?) Comment.new(&lt;invalid attrs&gt;).save
-- should be attempted save
-- should not be saved
-
-(re: saved?) Comment.new(&lt;invalid attrs&gt;).save then update_attributes(&lt;valid attrs&gt;)
-- should be attempted save
-- should be saved
-
-(re: saved?) Comment.new(&lt;invalid attrs&gt;).save then update_attributes(&lt;valid attrs&gt;).reload
-- should not be attempted save
-- should not be saved
-
-(re: saved?) Comment.new(&lt;invalid attrs&gt;).save then update_attributes(&lt;valid attrs&gt;).reload.save
-- should be attempted save
-- should be saved
-
 ActionView with resources_controller Helper
 - should forward #resource_name to controller
 - should forward #resources_name to controller
@@ -871,7 +870,6 @@ A controller's resource_service
 
 deprecated methods
 - #save_resource should send resource.save
-- #resource_saved? should send resource.saved?
 
 #route_enclosing_names TagsController for named_route:
 - :tags should be []
@@ -894,6 +892,6 @@ deprecated methods
 #route_enclosing_names Admin::Superduper::ForumsController for named_route:
 - :admin_superduper_forums should be []
 
-Finished in 8.867688 seconds
+Finished in 8.299069 seconds
 
-605 examples, 0 failures
+601 examples, 0 failures</diff>
      <filename>SPECDOC</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,2 @@
-require 'ardes/active_record/saved'
-ActiveRecord::Base.send :include, Ardes::ActiveRecord::Saved
-
 require 'ardes/resources_controller'
-ActionController::Base.extend Ardes::ResourcesController
+ActionController::Base.extend Ardes::ResourcesController
\ No newline at end of file</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -665,17 +665,12 @@ module Ardes#:nodoc:
         @enclosing_collection_resources ||= []
       end
       
-      # DEPRECATED: just use resource.saved?
+      # Has the resource been saved?
       #
-      # Returns self.resource.save and caches the result for future calls.
-      # This is useful when you want to know outside of an action whether the resource was saved.
-      #
-      # Pass true to ignore the cached value
-      def resource_saved?(reload = false)
-        resource.save unless resource.attempted_save?
-        resource.saved?
+      # Returns true if the record is not new, and there are no errors
+      def resource_saved?
+        !resource.new_record? &amp;&amp; resource.errors.empty?
       end
-      deprecate :resource_saved? =&gt; 'Use resource.saved?'
       
       # DEPRECATED: just use resource.save
       def save_resource</diff>
      <filename>lib/ardes/resources_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -54,11 +54,4 @@ describe &quot;deprecated methods&quot; do
       @controller.save_resource
     end
   end
-  
-  it &quot;#resource_saved? should send resource.saved?&quot; do
-    ActiveSupport::Deprecation.silence do
-      @controller.resource.should_receive(:saved?)
-      @controller.resource_saved?
-    end
-  end
 end
\ No newline at end of file</diff>
      <filename>spec/specs/resources_controller_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/ardes/active_record/saved.rb</filename>
    </removed>
    <removed>
      <filename>spec/models/comment_saved_spec.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>2f496874436e334346d4b0d8029a055c6821c93b</id>
    </parent>
  </parents>
  <author>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </author>
  <url>http://github.com/ianwhite/resources_controller/commit/9418e02f40a40faa1da70235e3a2143a0560f5f6</url>
  <id>9418e02f40a40faa1da70235e3a2143a0560f5f6</id>
  <committed-date>2008-09-08T07:19:21-07:00</committed-date>
  <authored-date>2008-09-08T07:19:21-07:00</authored-date>
  <message>resource_saved? has different semantics
Removed the Saved AR mixin</message>
  <tree>71812e0414acd49c4009a966c3f2cfd4b90a6fb6</tree>
  <committer>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </committer>
</commit>
