public
Rubygem
Description: RSpec extension library for Ruby on Rails
Homepage:
Clone URL: git://github.com/dchelimsky/rspec-rails.git
handle render_partial with either 1 or 3 parameters
David Chelimsky (author)
Sat Aug 23 13:45:48 -0700 2008
commit  1825a662bf45a9630c3177c4109e3f17906723aa
tree    d0291385740dc8e565a9a49b0187fc4f6e4fea91
parent  2cddc904bdfb70bf201123d4fc6731512cde5482
...
10
11
12
13
 
 
 
 
 
14
15
16
...
10
11
12
 
13
14
15
16
17
18
19
20
0
@@ -10,7 +10,11 @@ module ActionView #:nodoc:
0
           end
0
         end
0
       end
0
-      super(partial_path, local_assigns, deprecated_local_assigns)
0
+      begin
0
+        super(partial_path, local_assigns, deprecated_local_assigns)
0
+      rescue ArgumentError # edge rails > 2.1 changed render_partial to accept only one arg
0
+        super(partial_path)
0
+      end
0
     end
0
 
0
     alias_method :orig_render, :render

Comments