Skip to content

Commit 2841450

Browse files
committed
Only undef deprecated methods if they still exist. Gone in 4.1/master.
1 parent f0ceb99 commit 2841450

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/prototype-rails/javascript_helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
ActionView::Helpers::JavaScriptHelper.module_eval do
44
include ActionView::Helpers::PrototypeHelper
5-
undef_method :button_to_function
6-
undef_method :link_to_function
5+
undef_method :button_to_function if method_defined? :button_to_function
6+
undef_method :link_to_function if method_defined? :link_to_function
77

88
# Returns a button with the given +name+ text that'll trigger a JavaScript +function+ using the
99
# onclick handler.

0 commit comments

Comments
 (0)