Permalink
Browse files

remove useless to_param call

extract_subdomain always returns a string, and to_param calls to_s on a
string
  • Loading branch information...
tenderlove committed Jun 11, 2014
1 parent ba1c685 commit df3c78296a404e83df141dbeead506e4884f2a0f
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/http/url.rb
@@ -126,7 +126,7 @@ def normalize_host(_host, options)
if subdomain == true || !options.key?(:subdomain)
return _host if options[:domain].nil?
- host << extract_subdomain(_host, tld_length).to_param
+ host << extract_subdomain(_host, tld_length)
elsif subdomain
host << subdomain.to_param
end

0 comments on commit df3c782

Please sign in to comment.