From 422b3d70d5aba24e6a8f94722db449d5647f22d3 Mon Sep 17 00:00:00 2001 From: Bogdan Gusiev Date: Sat, 4 Aug 2012 14:24:35 +0300 Subject: Simplify logical statement --- actionpack/lib/action_dispatch/routing/route_set.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 6bb15ba3b6..acf2861730 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -476,10 +476,8 @@ module ActionDispatch 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 -- cgit v1.2.3