Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Bugfix in should_rest_route. Shouldn't mess with passed-in actions.

  • Loading branch information...
commit 65bcb31d58303da087171e1d5af7417f5b9f960c 1 parent 468c72f
Maxim Chernyak aka hakunin authored October 13, 2009

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  shoulda_macros/functionals.rb
6  shoulda_macros/functionals.rb
@@ -24,8 +24,10 @@ def should_rest_route *actions
24 24
                            (plural && controller.pluralize) || 
25 25
                            controller.singularize).underscore
26 26
       
27  
-      actions = actions.empty? ? [:index, :show, :new, :create, :edit, :update, :destroy] : actions
28  
-      actions.shift unless plural
  27
+      if actions.empty?
  28
+        actions = [:index, :show, :new, :create, :edit, :update, :destroy]
  29
+        actions.shift unless plural
  30
+      end
29 31
 
30 32
       actions.each do |action|
31 33
         case action

0 notes on commit 65bcb31

Please sign in to comment.
Something went wrong with that request. Please try again.