Browse files

Specify :group => :all so that spree.assets.precompile runs even when…

… initialize_on_precompile is false

Improved formatting: the line was way too long and now we don't need quotes or commas

Merges #1576

No need for add_assets_to_precompile_list method in Core::Engine now
  • Loading branch information...
1 parent a93289d commit 2c3aa0fd12b70385da0dd147bc02b6db931e9d17 Ryan Bigg and Philip Arndt committed with radar May 22, 2012
Showing with 11 additions and 7 deletions.
  1. +11 −7 core/lib/spree/core/engine.rb
View
18 core/lib/spree/core/engine.rb
@@ -69,9 +69,17 @@ def self.activate
app.config.filter_parameters += [:password, :password_confirmation, :number]
end
- # sets the manifests / assets to be precompiled
- initializer "spree.assets.precompile" do |app|
- Spree::Core::Engine.add_assets_to_precompile_list!(app)
+ # sets the manifests / assets to be precompiled, even when initialize_on_precompile is false
+ initializer "spree.assets.precompile", :group => :all do |app|
+ app.config.assets.precompile += %w[
+ store/all.*
+ admin/all.*
+ admin/orders/edit_form.js
+ admin/address_states.js
+ jqPlot/excanvas.min.js
+ admin/images/new.js
+ jquery.jstree/themes/apple/*
+ ]
end
initializer "spree.mail.settings" do |app|
@@ -80,10 +88,6 @@ def self.activate
Mail.register_interceptor(Spree::Core::MailInterceptor)
end
end
-
- def self.add_assets_to_precompile_list!(app)
- app.config.assets.precompile += ['store/all.*', 'admin/all.*', 'admin/orders/edit_form.js', 'admin/address_states.js', 'jqPlot/excanvas.min.js', 'admin/images/new.js', 'jquery.jstree/themes/apple/*']
- end
end
end
end

0 comments on commit 2c3aa0f

Please sign in to comment.