Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup generate_extras build/parse mess

  • Loading branch information...
commit d1191507bc8ffa4f7fe59b1cfb03dfbf6b73a798 1 parent 1b82590
@josh josh authored
Showing with 3 additions and 9 deletions.
  1. +3 −9 actionpack/lib/action_dispatch/routing/route_set.rb
View
12 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -433,7 +433,7 @@ def generate(options, recall = {}, method = :generate)
raise ActionController::RoutingError, "No route matches #{options.inspect}"
end
- uri, params = result
+ path, params = result
params.each do |k, v|
if v
params[k] = v
@@ -442,16 +442,10 @@ def generate(options, recall = {}, method = :generate)
end
end
- uri << "?#{params.to_query}" if uri && params.any?
- path = uri
-
if path && method == :generate_extras
- uri = URI(path)
- extras = uri.query ?
- Rack::Utils.parse_nested_query(uri.query).keys.map { |k| k.to_sym } :
- []
- [uri.path, extras]
+ [path, params.keys]
elsif path
+ path << "?#{params.to_query}" if params.any?
path
else
raise ActionController::RoutingError, "No route matches #{options.inspect}"
Please sign in to comment.
Something went wrong with that request. Please try again.