Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

avoid array allocation when extracting usernames and passwords

  • Loading branch information...
commit 325c9d5e5235db4b5210d9db6c863835d1ac7eed 1 parent 890a189
@tenderlove tenderlove authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 actionpack/lib/action_dispatch/routing/route_set.rb
View
8 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -654,7 +654,13 @@ def _generate_prefix(options = {})
def url_for(options)
options = default_url_options.merge(options || {})
- user, password = extract_authentication(options)
+ user = password = nil

@tenderlove does that mean we can get rid of extract_authentication?

@pixeltrix Owner

@carlosantoniodasilva yes, yes you can :smile:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
+ if options[:user] && options[:password]
+ user = options.delete :user
+ password = options.delete :password
+ end
+
recall = options.delete(:_recall)
original_script_name = options.delete(:original_script_name).presence

1 comment on commit 325c9d5

@carlosantoniodasilva

@tenderlove does that mean we can get rid of extract_authentication?

@tenderlove
Owner

Oops. I was going to rm it but totally forgot. Please rm!

Please sign in to comment.
Something went wrong with that request. Please try again.