Permalink
Browse files

Fixed whitespace

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@580 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 66b504b commit e505a4517387e1f628f6b2e5f6689526c7a74354 @dhh dhh committed Feb 11, 2005
Showing with 8 additions and 7 deletions.
  1. +8 −7 actionpack/lib/action_controller/url_rewriter.rb
@@ -41,7 +41,7 @@ def rewrite_url(path, options)
rewritten_url << (options[:protocol] || @request.protocol) unless options[:only_path]
rewritten_url << (options[:host] || @request.host_with_port) unless options[:only_path]
- rewritten_url << options[:application_prefix] if options[:application_prefix]
+ rewritten_url << options[:application_prefix] if options[:application_prefix]
rewritten_url << path
rewritten_url << build_query_string(new_parameters(options)) if options[:params] || options[:overwrite_params]
rewritten_url << "##{options[:anchor]}" if options[:anchor]
@@ -176,14 +176,15 @@ def build_query_string(hash)
query_string = ""
hash.each do |key, value|
- key = CGI.escape key
- key += '[]' if value.class == Array
- value = [ value ] unless value.class == Array
- value.each { |val| elements << "#{key}=#{CGI.escape(val.to_s)}" }
- end
+ key = CGI.escape key
+ key += '[]' if value.class == Array
+ value = [ value ] unless value.class == Array
+ value.each { |val| elements << "#{key}=#{CGI.escape(val.to_s)}" }
+ end
+
unless elements.empty? then query_string << ("?" + elements.join("&")) end
return query_string
end
end
-end
+end

0 comments on commit e505a45

Please sign in to comment.