<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -16,17 +16,20 @@ module Ardes
       def include_actions(controller, 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 = self.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
+        methods_to_remove(options).each {|m| mixin.send(:undef_method, m)}
         controller.send :include, mixin
       end
+      
+      def methods_to_remove(options = {})
+        if options[:only]
+          instance_methods - options[:only].map(&amp;:to_s)
+        elsif options[:except]
+          options[:except].map(&amp;:to_s) &amp; instance_methods
+        else
+          []
+        end
+      end
     end
   end
 end
\ No newline at end of file</diff>
      <filename>lib/ardes/resources_controller/include_actions.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8a3691dce98e953bcf5186b024707f7f73f6c896</id>
    </parent>
  </parents>
  <author>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </author>
  <url>http://github.com/ianwhite/resources_controller/commit/aa2c6e2d266bfa800fd00215a6a9cb125c76449d</url>
  <id>aa2c6e2d266bfa800fd00215a6a9cb125c76449d</id>
  <committed-date>2008-10-09T19:07:17-07:00</committed-date>
  <authored-date>2008-10-09T19:07:17-07:00</authored-date>
  <message>Added IncludeActions#methods_to_remove which enables easier custom behaviour for action modules</message>
  <tree>8a8b98b25c39d0bd679d3b4cd561defbfe3b76f8</tree>
  <committer>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </committer>
</commit>
