aboutsummaryrefslogtreecommitdiffstats
path: root/config/environments
diff options
context:
space:
mode:
Diffstat (limited to 'config/environments')
-rw-r--r--config/environments/development.rb7
-rw-r--r--config/environments/production.rb17
2 files changed, 24 insertions, 0 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 54ab2977f..629685c50 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -27,4 +27,11 @@ Alaveteli::Application.configure do
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
+
+ # Do not compress assets
+ config.assets.compress = false
+
+ # Expands the lines which load the assets
+ config.assets.debug = true
+
end
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 0c1929366..a3e3cebd2 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -31,4 +31,21 @@ Alaveteli::Application.configure do
if AlaveteliConfiguration::force_ssl
config.middleware.insert_before ActionDispatch::Cookies, ::Rack::SSL
end
+
+ # Compress JavaScripts and CSS
+ config.assets.compress = true
+
+ # Choose the compressors to use
+ # config.assets.js_compressor = :uglifier
+ # config.assets.css_compressor = :yui
+
+ # Don't fallback to assets pipeline if a precompiled asset is missed
+ config.assets.compile = false
+
+ # Generate digests for assets URLs.
+ config.assets.digest = true
+
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
+ # config.assets.precompile += %w( search.js )
+
end