Skip to content

Commit

Permalink
Merge pull request #2883 from bricesanchez/fix-2844
Browse files Browse the repository at this point in the history
Add conditionnal clear on before and after inclusion procs
  • Loading branch information
simi committed Feb 14, 2015
2 parents 76beee4 + cee696e commit 2c49dde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/lib/refinery/core/engine.rb
Expand Up @@ -17,12 +17,12 @@ def register_decorators!
# a before_inclusion and after_inclusion step that calls procs registered by the
# Refinery::Engine#before_inclusion and Refinery::Engine#after_inclusion class methods
def refinery_inclusion!
before_inclusion_procs.each(&:call).clear
before_inclusion_procs.each(&:call).tap{ |c| c.clear if Rails.application.config.cache_classes }

Refinery.include_once(::ApplicationController, Refinery::ApplicationController)
::ApplicationController.send :helper, Refinery::Core::Engine.helpers

after_inclusion_procs.each(&:call).clear
after_inclusion_procs.each(&:call).tap{ |c| c.clear if Rails.application.config.cache_classes }
end
end

Expand Down

0 comments on commit 2c49dde

Please sign in to comment.