We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0ceb99 commit 2841450Copy full SHA for 2841450
lib/prototype-rails/javascript_helper.rb
@@ -2,8 +2,8 @@
2
3
ActionView::Helpers::JavaScriptHelper.module_eval do
4
include ActionView::Helpers::PrototypeHelper
5
- undef_method :button_to_function
6
- undef_method :link_to_function
+ undef_method :button_to_function if method_defined? :button_to_function
+ undef_method :link_to_function if method_defined? :link_to_function
7
8
# Returns a button with the given +name+ text that'll trigger a JavaScript +function+ using the
9
# onclick handler.
0 commit comments