public
Description: resources_controller rails plugin: rc makes RESTful controllers fun
Homepage: http://plugins.ardes.com/doc/resources_controller
Clone URL: git://github.com/ianwhite/resources_controller.git
Click here to lend your support to: resources_controller and make a donation at www.pledgie.com !
renaming methods in IncludeActions for clarity
ianwhite (author)
Thu Oct 09 20:53:47 -0700 2008
commit  144de668978ff5345f04c1842815b115dc055789
tree    861c8511be80d0f86a2fe7c39fb03444c6ff60a7
parent  aa2c6e2d266bfa800fd00215a6a9cb125c76449d
...
17
18
19
20
 
21
22
23
24
 
 
 
 
 
25
26
27
...
17
18
19
 
20
21
22
23
 
24
25
26
27
28
29
30
31
0
@@ -17,11 +17,15 @@ module Ardes
0
         options.assert_valid_keys(:only, :except)
0
         raise ArgumentError, "you can only specify either :except or :only, not both" if options[:only] && options[:except]
0
         mixin = self.dup
0
-        methods_to_remove(options).each {|m| mixin.send(:undef_method, m)}
0
+        actions_to_remove(options).each {|a| mixin.remove_action(a) }
0
         controller.send :include, mixin
0
       end
0
       
0
-      def methods_to_remove(options = {})
0
+      def remove_action(action)
0
+        undef_method action
0
+      end
0
+      
0
+      def actions_to_remove(options = {})
0
         if options[:only]
0
           instance_methods - options[:only].map(&:to_s)
0
         elsif options[:except]

Comments