From f8088d7def4bf413533d85a1565be58231c3d23e Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Tue, 3 Mar 2009 17:20:57 -0800 Subject: memoize correctly ;) --- actionpack/lib/action_controller/abstract/helpers.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_controller/abstract/helpers.rb b/actionpack/lib/action_controller/abstract/helpers.rb index b942a7ea80..1947c360b8 100644 --- a/actionpack/lib/action_controller/abstract/helpers.rb +++ b/actionpack/lib/action_controller/abstract/helpers.rb @@ -14,8 +14,11 @@ module AbstractController end def _action_view - av = super - av.helpers.send(:include, master_helper_module) + @_action_view ||= begin + av = super + av.helpers.send(:include, master_helper_module) + av + end end module ClassMethods -- cgit v1.2.3