aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorBogdan Gusiev <agresso@gmail.com>2012-08-04 14:24:35 +0300
committerBogdan Gusiev <agresso@gmail.com>2012-08-04 14:24:35 +0300
commit422b3d70d5aba24e6a8f94722db449d5647f22d3 (patch)
tree62bb50d48ade12ef579ed354a7968860da65ff02 /actionpack/lib/action_dispatch
parent067efad8af6e84e45518120a77dfbb0b49c94469 (diff)
downloadrails-422b3d70d5aba24e6a8f94722db449d5647f22d3.tar.gz
rails-422b3d70d5aba24e6a8f94722db449d5647f22d3.tar.bz2
rails-422b3d70d5aba24e6a8f94722db449d5647f22d3.zip
Simplify logical statement
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb6
1 files changed, 2 insertions, 4 deletions
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