lib/coco/engine.rb in coveragebook_components-0.9.1 vs lib/coco/engine.rb in coveragebook_components-0.10.0
- old
+ new
@@ -28,11 +28,13 @@
Dir.glob("#{coco_dir}/{app,book}/{blocks,elements,layouts}/**/*.rb").each do |path|
autoloader.collapse(File.dirname(path))
end
end
- Rails.application.config.to_prepare do
- Rails.autoloaders.main.eager_load_dir(coco_dir)
+ if Rails.env.production?
+ Rails.application.config.to_prepare do
+ Rails.autoloaders.main.eager_load_dir(coco_dir)
+ end
end
end
initializer "coco.assets" do |app|
if app.config.respond_to?(:assets)