diff options
author | Bogdan Gusiev <agresso@gmail.com> | 2012-08-04 14:24:35 +0300 |
---|---|---|
committer | Bogdan Gusiev <agresso@gmail.com> | 2012-08-04 14:24:35 +0300 |
commit | 422b3d70d5aba24e6a8f94722db449d5647f22d3 (patch) | |
tree | 62bb50d48ade12ef579ed354a7968860da65ff02 | |
parent | 067efad8af6e84e45518120a77dfbb0b49c94469 (diff) | |
download | rails-422b3d70d5aba24e6a8f94722db449d5647f22d3.tar.gz rails-422b3d70d5aba24e6a8f94722db449d5647f22d3.tar.bz2 rails-422b3d70d5aba24e6a8f94722db449d5647f22d3.zip |
Simplify logical statement
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 6 |
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 |