Skip to content

Commit

Permalink
Set values instead of building hashes with single values for merging
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed Nov 15, 2013
1 parent ce06d57 commit 5f00f13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actionpack/lib/action_dispatch/routing/mapper.rb
Expand Up @@ -168,7 +168,7 @@ def normalize_defaults!
end

def normalize_conditions!
@conditions.merge!(:path_info => path)
@conditions[:path_info] = path

constraints.each do |key, condition|
unless segment_keys.include?(key) || key == :controller
Expand Down Expand Up @@ -196,7 +196,7 @@ def normalize_conditions!

if via = options[:via]
list = Array(via).map { |m| m.to_s.dasherize.upcase }
@conditions.merge!(:request_method => list)
@conditions[:request_method] = list
end
end

Expand Down

0 comments on commit 5f00f13

Please sign in to comment.