diff options
Diffstat (limited to 'actionpack/lib/action_view/vendor/builder')
-rw-r--r-- | actionpack/lib/action_view/vendor/builder/blankslate.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/vendor/builder/blankslate.rb b/actionpack/lib/action_view/vendor/builder/blankslate.rb index 25307b0e56..dad741ecf6 100644 --- a/actionpack/lib/action_view/vendor/builder/blankslate.rb +++ b/actionpack/lib/action_view/vendor/builder/blankslate.rb @@ -17,7 +17,10 @@ module Builder #:nodoc: class BlankSlate #:nodoc: class << self def hide(name) - undef_method name unless name =~ /^(__|instance_eval)/ + undef_method name if + instance_methods.include?(name.to_s) and + name !~ /^(__|instance_eval)/ + end end end |