Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

clear set of loaded slices on every page reload in development mode

  • Loading branch information...
commit 4e84991ee83671420176e6674c2cc5766a114c36 1 parent 80e8e3a
@niklas authored
Showing with 6 additions and 0 deletions.
  1. +2 −0  adva-core/lib/adva.rb
  2. +4 −0 adva-core/lib/adva/core.rb
View
2  adva-core/lib/adva.rb
@@ -63,6 +63,8 @@ def slice(path_with_namespace, &block)
end
class_name.constantize.class_eval(&block)
loaded_slices << path_with_namespace
+ else
+ Rails.logger.debug { "Adva.slice: already loaded #{path_with_namespace}, skipping" }
end
end
View
4 adva-core/lib/adva/core.rb
@@ -90,5 +90,9 @@ class Core < ::Rails::Engine
adva-core/admin/lists )
)
end
+
+ ActionController::Dispatcher.to_prepare do
+ Adva.loaded_slices.clear
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.