Permalink
Browse files

Only undef deprecated methods if they still exist. Gone in 4.1/master.

  • Loading branch information...
1 parent f0ceb99 commit 2841450c007aa149ed15cfa9782d4a3a326e7ce2 @jeremy jeremy committed Sep 8, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/prototype-rails/javascript_helper.rb
@@ -2,8 +2,8 @@
ActionView::Helpers::JavaScriptHelper.module_eval do
include ActionView::Helpers::PrototypeHelper
- undef_method :button_to_function
- 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
# Returns a button with the given +name+ text that'll trigger a JavaScript +function+ using the
# onclick handler.

0 comments on commit 2841450

Please sign in to comment.