|
|
|
@ -27,6 +27,27 @@ |
|
|
|
|
# See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
#++ |
|
|
|
|
|
|
|
|
|
require 'sprockets/rails' |
|
|
|
|
|
|
|
|
|
module Sprockets |
|
|
|
|
module Rails |
|
|
|
|
# Workaround to ensure some asset helpers (like #image_path) use the |
|
|
|
|
# correct asset prefix. |
|
|
|
|
# Helps OpenProject::Themes::ViewHelpers# find theme assets. |
|
|
|
|
# NOTE: repercussions of this hack are unknown. |
|
|
|
|
module LegacyAssetUrlHelper |
|
|
|
|
ASSET_PUBLIC_DIRECTORIES.replace({ |
|
|
|
|
:audio => '/assets', |
|
|
|
|
:font => '/assets', |
|
|
|
|
:image => '/assets', |
|
|
|
|
:javascript => '/assets', |
|
|
|
|
:stylesheet => '/assets', |
|
|
|
|
:video => '/assets' |
|
|
|
|
}) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
require 'active_record' |
|
|
|
|
|
|
|
|
|
module ActiveRecord |
|
|
|
|