diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/engine.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index e26f73ed8d..81a0350724 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -522,9 +522,15 @@ module Rails end initializer :append_assets_path do |app| - app.config.assets.paths.unshift(*paths["vendor/assets"].existent) - app.config.assets.paths.unshift(*paths["lib/assets"].existent) - app.config.assets.paths.unshift(*paths["app/assets"].existent) + if app.config.assets.respond_to?(:prepend_path) + app.config.assets.prepend_path(*paths["vendor/assets"].existent) + app.config.assets.prepend_path(*paths["lib/assets"].existent) + app.config.assets.prepend_path(*paths["app/assets"].existent) + else + app.config.assets.paths.unshift(*paths["vendor/assets"].existent) + app.config.assets.paths.unshift(*paths["lib/assets"].existent) + app.config.assets.paths.unshift(*paths["app/assets"].existent) + end end initializer :prepend_helpers_path do |app| |