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 !
Made action_methods_to_remove tolerant of single symbols for :only and :except
Tom Stuart (author)
Mon Oct 13 08:59:13 -0700 2008
commit  757310e6116f74721759d14e7f706e52e26b9f39
tree    b4c7bc06a9f7a97c036e4d181d9815939174ba8b
parent  35fda338e48654222d3566f18cb64964eba433a1
...
27
28
29
30
 
31
32
 
33
34
35
...
27
28
29
 
30
31
 
32
33
34
35
0
@@ -27,9 +27,9 @@ module Ardes
0
       
0
       def action_methods_to_remove(options = {})
0
         if options[:only]
0
-          instance_methods - options[:only].map(&:to_s)
0
+          instance_methods - Array(options[:only]).map(&:to_s)
0
         elsif options[:except]
0
-          options[:except].map(&:to_s) & instance_methods
0
+          Array(options[:except]).map(&:to_s) & instance_methods
0
         else
0
           []
0
         end

Comments