Created
June 28, 2011 16:49
-
-
Save lukemelia/1051574 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/caching_presenter.rb b/lib/caching_presenter.rb | |
| index 0b11077..4578511 100644 | |
| --- a/lib/caching_presenter.rb | |
| +++ b/lib/caching_presenter.rb | |
| @@ -33,7 +33,11 @@ class CachingPresenter | |
| @cached_instance_methods = Hash.new{ |h,k| h[k] = {}} | |
| write_constructor :presents => @presents, :options => options | |
| %w(class id to_param).each do |method| | |
| - undef_method method if respond_to?(method) | |
| + begin | |
| + undef_method method if respond_to?(method) | |
| + rescue NameError | |
| + # Under Ruby 1.9, this is failing for to_param. Need to investigate further. | |
| + end | |
| end | |
| else | |
| @presents |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment