<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,11 +2,15 @@
 
 response_for (see Ardes::ResponseFor::ClassMethods) allows you to decorate the respond_to block of actions on sublcassed controllers.  This works nicely with http://plugins.ardes.com/doc/resources_controller
 
-== Version 0.2
+== Current Version 0.2-stable
 
-Version 0.2 of response_for has BC-breaking API changes, has vastly simplified internals, and is supported only for Rails &gt;= 2.1.x.
+Version 0.2-stable of response_for has BC-breaking API changes, has vastly simplified internals, and is supported only for Rails &gt;= 2.1.x.
 
-Version 0.2 was released on Sept 14th 2008.
+Version 0.2.0 was released on Sept 14th 2008.
+
+As of version 0.2.0, response_for's functionality can be summed up in one sentence:
+
+&quot;response_for allows you to specify default responses for any action (or before filter) that doesn't render or redirect&quot;
 
 == Version 0.1
 
@@ -36,7 +40,6 @@ using rails &gt;= 2.1 then use the 0.1-stable branch
     
     response_for :index, :show, :types =&gt; [:html, :xml, :js]
   end
-  
 
 === Specs and Coverage
 </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,6 @@ module Ardes #:nodoc:
       # == Usage
       #
       #   response_for :action1 [, :action2], [,:types =&gt; [:mime, :type, :list]] [ do |format| ... end] # or
-      #   response_for :action1 [, :action2], [,:type =&gt; :mime_type] [ do |format| ... end]
       #
       # === Example
       #
@@ -41,29 +40,13 @@ module Ardes #:nodoc:
       #     response_for :index, :show, :types =&gt; [:html, :xml, :js]
       #   end
       #
-      # === respond_to takes precedence
+      # === when response_for kicks in
       # 
-      # If you write your action with a respond_to block, response_for will never be invoked for that action.
-      # If you want to write a controller so that its subclasses can use response_for then do this:
-      #
-      #   # before
-      #   def show
-      #     @thing = Thing.find(params[:id])
-      #     respond_to do |format|
-      #       format.html { }
-      #       format.xml  { render :xml =&gt; @thing }
-      #     end
-      #   end
+      # response_for only kicks in if the action (or any filters) have not already redirected or rendered.
       # 
-      #   # after
-      #   def show
-      #     @thing = Thing.find(params[:id])
-      #   end
-      #
-      #   response_for :show do |format|
-      #     format.html { }
-      #     format.xml  { render :xml =&gt; @thing }
-      #   end
+      # This means that if you foresee wanting to override your action's responses, you should write them without
+      # a respond_to block, but with a response_for block (the latter can be overridden by subsequent response_fors, the 
+      # former cannot)
       # 
       # === Other examples 
       #
@@ -101,14 +84,14 @@ module Ardes #:nodoc:
           action_responses[action].unshift types_block if types_block
           action_responses[action].unshift block if block
           
-          # if there's no action yet defined, create a stub - this is so that you
-          # can provide responses for actions which are simply templates, or simply define responses
+          # if there's no action yet defined, create an empty one - this is so that you
+          # we may provide responses for templates
           class_eval &quot;def #{action}; end&quot; unless instance_methods.include?(action)
         end
       end
     
-      # remove any response for the specified actions.  If no arguments are given, the
-      # entire all repsonses for all actions are removed
+      # remove any response for the specified actions.  If no arguments are given,
+      # then all repsonses for all actions are removed
       def remove_response_for(*actions)
         if actions.empty?
           instance_variable_set('@action_responses', nil)
@@ -129,6 +112,7 @@ module Ardes #:nodoc:
     end
     
   protected
+    # if there are responses for the current action, then respond_to them
     def respond_to_action_responses
       if (responses = self.class.action_responses[action_name]) &amp;&amp; responses.any?
         respond_to do |responder|
@@ -139,6 +123,8 @@ module Ardes #:nodoc:
       end
     end
     
+    # this method is invoked if we've got to the end of an action without
+    # performing, which is when we respond_to any repsonses defined 
     def default_render_with_response_for
       respond_to_action_responses
       default_render_without_response_for unless performed?</diff>
      <filename>lib/ardes/response_for.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>37e2d2edda0f2d1bad8571ea21573895c2ad1dd6</id>
    </parent>
  </parents>
  <author>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </author>
  <url>http://github.com/ianwhite/response_for/commit/9dc94651a1ca42721e95af36728cdf8366156eca</url>
  <id>9dc94651a1ca42721e95af36728cdf8366156eca</id>
  <committed-date>2008-09-13T20:40:54-07:00</committed-date>
  <authored-date>2008-09-13T20:40:54-07:00</authored-date>
  <message>Final notes and docfixes for 0.2.0 release.  This is the 0.2.0 release</message>
  <tree>c0ffd3fb3ac96617cde4eb5f2b81d966aea105f6</tree>
  <committer>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </committer>
</commit>
