Permalink
Browse files

Simplify logical statement

  • Loading branch information...
bogdan committed Aug 4, 2012
1 parent 067efad commit 422b3d70d5aba24e6a8f94722db449d5647f22d3
Showing with 2 additions and 4 deletions.
  1. +2 −4 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -476,10 +476,8 @@ def current_controller
def use_recall_for(key)
if @recall[key] && (!@options.key?(key) || @options[key] == @recall[key])
- if named_route_exists?
- @options[key] = @recall.delete(key) if segment_keys.include?(key)
- else
- @options[key] = @recall.delete(key)
+ if !named_route_exists? || segment_keys.include?(key)
+ @options[key] = @recall.delete(key)
end
end
end

0 comments on commit 422b3d7

Please sign in to comment.