DEV: Add option to precompile default multisite stylesheets
This commit is contained in:
parent
4f48304a44
commit
7a0d1cadc5
|
@ -50,9 +50,9 @@ task 'assets:precompile:css' => 'environment' do
|
|||
STDERR.puts "Start compiling CSS: #{Time.zone.now}"
|
||||
|
||||
RailsMultisite::ConnectionManagement.each_connection do |db|
|
||||
# Heroku precompiles assets before db migration, so tables may not exist.
|
||||
# css will get precompiled during first request instead in that case.
|
||||
next if ENV["PRECOMPILE_SHARED_MULTISITE_CSS"] == "1" && db != "default"
|
||||
|
||||
# css will get precompiled during first request if tables do not exist.
|
||||
if ActiveRecord::Base.connection.table_exists?(Theme.table_name)
|
||||
STDERR.puts "Compiling css for #{db} #{Time.zone.now}"
|
||||
begin
|
||||
|
|
Loading…
Reference in New Issue