<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/ardes/resources_controller/include_actions.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,7 @@
+* If you use your own Action modules, you can now define a module method #include_actions to do the :only / :except 
+  handling yourself.  See Ardes::ResourcesController::IncludeActions.  This change is completely BC, you don't need 
+  to do anything to any of your existing action modules. 
+
 * use add_enclosing_resource to add your own enclosing resources if you're skipping load_enclosing_resources [Tom Stuart, Joel Chippindale]
 
 * The reason for the reversion in c21f35c has been fixed.  Thanks Jason Lee for the bug report.</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -484,25 +484,12 @@ module Ardes#:nodoc:
       map_enclosing_resource(*args, &amp;block)
     end
     
-    # Include the specified module, optionally specifying which public methods to include
-    #
-    # eg
-    # 
-    #   include_actions ActionMixin, :only =&gt; :index
-    #   include_actions ActionMixin, :except =&gt; [:create, :new]
+    # Include the specified module, optionally specifying which public methods to include, for example:
+    #  include_actions ActionMixin, :only =&gt; :index
+    #  include_actions ActionMixin, :except =&gt; [:create, :new]
     def include_actions(mixin, options = {})
-      options.assert_valid_keys(:only, :except)
-      raise ArgumentError, &quot;you can only specify either :except or :only, not both&quot; if options[:only] &amp;&amp; options[:except]
-      
-      mixin = mixin.dup
-      if only = options[:only]
-        only = Array(options[:only]).collect(&amp;:to_s)
-        mixin.instance_methods.each {|m| mixin.send(:undef_method, m) unless only.include?(m)}
-      elsif except = options[:except]
-        except = Array(options[:except]).collect(&amp;:to_s)
-        mixin.instance_methods.each {|m| mixin.send(:undef_method, m) if except.include?(m)}
-      end
-      include mixin
+      mixin.extend(IncludeActions) unless mixin.respond_to?(:include_actions)
+      mixin.include_actions(self, options)
     end
   
   private</diff>
      <filename>lib/ardes/resources_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>23f8b9e4d72e9e0b0837a972be596c36fbb65cca</id>
    </parent>
  </parents>
  <author>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </author>
  <url>http://github.com/ianwhite/resources_controller/commit/8a3691dce98e953bcf5186b024707f7f73f6c896</url>
  <id>8a3691dce98e953bcf5186b024707f7f73f6c896</id>
  <committed-date>2008-10-09T17:48:55-07:00</committed-date>
  <authored-date>2008-10-09T17:48:55-07:00</authored-date>
  <message>Added include_actions extension for including actions/customising including actions. If you use your own Action modules, you can now define a module method #include_actions to do the :only / :except
  handling yourself.  See Ardes::ResourcesController::IncludeActions.  This change is completely BC, you don't need
  to do anything to any of your existing action modules.</message>
  <tree>7c525fec836605b06dffbef51837226cb30b83c7</tree>
  <committer>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </committer>
</commit>
