aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-01-13 05:46:28 -0800
committerSantiago Pastorino <santiago@wyeworks.com>2012-01-13 05:46:28 -0800
commitdaf59a73861bee7726a502c24a796c67e2ecd45f (patch)
treef520a04111c2212b931aed777bdb0cec5ec8b756
parent8fd8f99e1eb91198dca953b8268992131d783a21 (diff)
parent22cbc1a14da1562797c0b3388805034fb9fc1b7f (diff)
downloadrails-daf59a73861bee7726a502c24a796c67e2ecd45f.tar.gz
rails-daf59a73861bee7726a502c24a796c67e2ecd45f.tar.bz2
rails-daf59a73861bee7726a502c24a796c67e2ecd45f.zip
Merge pull request #4448 from lest/patch-1
cleanup AV::Helpers::UrlHelper
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb18
1 files changed, 1 insertions, 17 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index 5af5965c36..ebd1f280a8 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -503,7 +503,7 @@ module ActionView
extras = %w{ cc bcc body subject }.map { |item|
option = html_options.delete(item) || next
- "#{item}=#{Rack::Utils.escape(option).gsub("+", "%20")}"
+ "#{item}=#{Rack::Utils.escape_path(option)}"
}.compact
extras = extras.empty? ? '' : '?' + ERB::Util.html_escape(extras.join('&'))
@@ -643,22 +643,6 @@ module ActionView
html_options["data-method"] = method
end
- def options_for_javascript(options)
- if options.empty?
- '{}'
- else
- "{#{options.keys.map { |k| "#{k}:#{options[k]}" }.sort.join(', ')}}"
- end
- end
-
- def array_or_string_for_javascript(option)
- if option.kind_of?(Array)
- "['#{option.join('\',\'')}']"
- elsif !option.nil?
- "'#{option}'"
- end
- end
-
# Processes the +html_options+ hash, converting the boolean
# attributes from true/false form into the form required by
# HTML/XHTML. (An attribute is considered to be boolean if