Permalink
Browse files

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

  • Loading branch information...
1 parent 468c72f commit 65bcb31d58303da087171e1d5af7417f5b9f960c @maxim committed Oct 13, 2009
Showing with 4 additions and 2 deletions.
  1. +4 −2 shoulda_macros/functionals.rb
@@ -24,8 +24,10 @@ def should_rest_route *actions
(plural && controller.pluralize) ||
controller.singularize).underscore
- actions = actions.empty? ? [:index, :show, :new, :create, :edit, :update, :destroy] : actions
- actions.shift unless plural
+ if actions.empty?
+ actions = [:index, :show, :new, :create, :edit, :update, :destroy]
+ actions.shift unless plural
+ end
actions.each do |action|
case action

0 comments on commit 65bcb31

Please sign in to comment.