Fixed link_to :confirm #936 [Nicholas Seckar]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@994 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 eb27b744
*SVN* *SVN*
* Fixed link_to :confirm #936 [Nicholas Seckar]
* Improved error reporting especially around never shallowing exceptions. Debugging helpers should be much easier now #980 [Nicholas Seckar] * Improved error reporting especially around never shallowing exceptions. Debugging helpers should be much easier now #980 [Nicholas Seckar]
* Fixed Toggle.display in prototype.js #902 [Lucas Carlson] * Fixed Toggle.display in prototype.js #902 [Lucas Carlson]
......
...@@ -21,7 +21,7 @@ def url_for(options = {}, *parameters_for_method_reference) ...@@ -21,7 +21,7 @@ def url_for(options = {}, *parameters_for_method_reference)
# Example: # Example:
# link_to "Delete this page", { :action => "destroy", :id => @page.id }, :confirm => "Are you sure?" # link_to "Delete this page", { :action => "destroy", :id => @page.id }, :confirm => "Are you sure?"
def link_to(name, options = {}, html_options = nil, *parameters_for_method_reference) def link_to(name, options = {}, html_options = nil, *parameters_for_method_reference)
html_options = (html_options || {}).symbolize_keys html_options = (html_options || {}).stringify_keys
convert_confirm_option_to_javascript!(html_options) convert_confirm_option_to_javascript!(html_options)
if options.is_a?(String) if options.is_a?(String)
content_tag "a", name || options, (html_options || {}).merge("href" => options) content_tag "a", name || options, (html_options || {}).merge("href" => options)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册