Skip to content

Commit

Permalink
making non remote versions of link_to, button_to, submit_tag and imag…
Browse files Browse the repository at this point in the history
…e_submit_tag output data attributes for things like :confirm, :method, :popup, and :disable_with
  • Loading branch information
erikstmartin authored and stefanpenner committed Jan 27, 2010
1 parent 9821648 commit 426a6b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions actionpack/lib/action_view/helpers/javascript_helper.rb
Expand Up @@ -215,7 +215,10 @@ def add_confirm_to_attributes!(html_options, confirm)
end

def add_method_to_attributes!(html_options, method, url = nil)
<<<<<<< HEAD
html_options["rel"] = "nofollow" if method.to_s.downcase == "delete"
=======
>>>>>>> making non remote versions of link_to, button_to, submit_tag and image_submit_tag output data attributes for things like :confirm, :method, :popup, and :disable_with
html_options["data-method"] = method
if url.size > 0
html_options["data-url"] = url
Expand Down

0 comments on commit 426a6b2

Please sign in to comment.