Correct for sprockets upgrade

pull/4424/head
Oliver Günther 9 years ago
parent 8d111c8838
commit cd94062207
  1. 16
      config/application.rb
  2. 2
      lib/open_project/themes/theme_finder.rb

@ -127,22 +127,6 @@ module OpenProject
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = 'utf-8'
# Whitelist assets to be precompiled.
#
# This is a workaround for an issue where the precompilation process will
# fail on extensionless files (README, LICENSE, etc.)
# See: https://github.com/sstephenson/sprockets/issues/347
precompile_whitelist = %w(
.html .erb .haml
.png .jpg .gif .jpeg .ico
.eot .otf .svc .woff .ttf
.svg
)
config.assets.precompile.shift
config.assets.precompile.unshift -> (path) {
(extension = File.extname(path)).present? and extension.in?(precompile_whitelist)
}
# Enable escaping HTML in JSON.
config.active_support.escape_html_entities_in_json = true

@ -65,7 +65,7 @@ module OpenProject
# we need to wrap the call to #stylesheet_manifest in a Proc,
# because when this code is executed the theme instance (theme) hasn't had
# a chance to override the method yet
Rails.application.config.assets.precompile << -> (path) {
Rails.application.config.assets.precompile << -> (path,*args) {
return if theme.abstract?
theme.stylesheet_manifest == path

Loading…
Cancel
Save