aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-01-16 05:04:19 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-01-16 05:04:19 +0000
commite87c4f064fcff9b697f13413dc33c36e8e77bd3c (patch)
treedd3bb09f13b6b7d2dcd376bdf40cfed9439b3f8b /actionpack
parent4793a2f5cdc07a5926e8399fd82a835c0dc0a023 (diff)
downloadrails-e87c4f064fcff9b697f13413dc33c36e8e77bd3c.tar.gz
rails-e87c4f064fcff9b697f13413dc33c36e8e77bd3c.tar.bz2
rails-e87c4f064fcff9b697f13413dc33c36e8e77bd3c.zip
Dont repeat the button_to method
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3425 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/javascript_helper.rb14
1 files changed, 0 insertions, 14 deletions
diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb
index 15609d5290..93a6e700b3 100644
--- a/actionpack/lib/action_view/helpers/javascript_helper.rb
+++ b/actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -72,20 +72,6 @@ module ActionView
}))
end
- # Returns a link that'll trigger a JavaScript +function+ using the
- # onclick handler.
- #
- # Examples:
- # button_to_function "Greeting", "alert('Hello world!')"
- # button_to_function "Delete", "if confirm('Really?'){ do_delete(); }")
- def button_to_function(name, function, html_options = {})
- html_options.symbolize_keys!
- tag(:input, html_options.merge({
- :type => "button", :value => name,
- :onclick => (html_options[:onclick] ? "#{html_options[:onclick]}; " : "") + "#{function};"
- }))
- end
-
# Includes the Action Pack JavaScript libraries inside a single <script>
# tag. The function first includes prototype.js and then its core extensions,
# (determined by filenames starting with "prototype").