Skip to content
Browse files

Merge pull request #4448 from lest/patch-1

cleanup AV::Helpers::UrlHelper
  • Loading branch information...
2 parents 8fd8f99 + 22cbc1a commit daf59a73861bee7726a502c24a796c67e2ecd45f @spastorino spastorino committed Jan 13, 2012
Showing with 1 addition and 17 deletions.
  1. +1 −17 actionpack/lib/action_view/helpers/url_helper.rb
View
18 actionpack/lib/action_view/helpers/url_helper.rb
@@ -503,7 +503,7 @@ def mail_to(email_address, name = nil, html_options = {})
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 @@ def add_method_to_attributes!(html_options, method)
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

0 comments on commit daf59a7

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