Commit f9a04729957569d154147ec505e0bc36a79000a3
1 parent
678f0e26
Exists in
master
and in
20 other branches
rails4: fix asset pipeline
Showing
2 changed files
with
3 additions
and
9 deletions
Show diff stats
config/application.rb
... | ... | @@ -75,13 +75,7 @@ module Noosfero |
75 | 75 | # parameters by using an attr_accessible or attr_protected declaration. |
76 | 76 | config.active_record.whitelist_attributes = true |
77 | 77 | |
78 | - # Enable the asset pipeline | |
79 | - config.assets.enabled = true | |
80 | - | |
81 | - # don't let rails prepend app/assets to config.assets.paths | |
82 | - # as we are doing it | |
83 | - config.paths['app/assets'] = '' | |
84 | - | |
78 | + # Asset pipeline | |
85 | 79 | config.assets.paths = |
86 | 80 | Dir.glob("app/assets/plugins/*/{,stylesheets,javascripts}") + |
87 | 81 | Dir.glob("app/assets/{,stylesheets,javascripts}") + | ... | ... |
config/environments/production.rb
... | ... | @@ -11,8 +11,8 @@ Noosfero::Application.configure do |
11 | 11 | # Enable Rails's static asset server (Apache or nginx should do this) |
12 | 12 | config.serve_static_assets = true |
13 | 13 | |
14 | - # Compress JavaScripts and CSS | |
15 | - config.assets.compress = true | |
14 | + # Compress JavaScripts (sass-rails enable compression of CSS by default) | |
15 | + config.assets.js_compressor = :uglifier | |
16 | 16 | |
17 | 17 | # Generate digests for assets URLs |
18 | 18 | config.assets.digest = true | ... | ... |