Permalink
Browse files

memoize correctly ;)

  • Loading branch information...
1 parent 6001cea commit f8088d7def4bf413533d85a1565be58231c3d23e @wycats wycats committed Mar 4, 2009
Showing with 5 additions and 2 deletions.
  1. +5 −2 actionpack/lib/action_controller/abstract/helpers.rb
View
7 actionpack/lib/action_controller/abstract/helpers.rb
@@ -14,8 +14,11 @@ def self.included(klass)
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

0 comments on commit f8088d7

Please sign in to comment.