diff options
author | Joshua Peek <josh@joshpeek.com> | 2011-05-19 21:49:50 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2011-05-19 21:50:07 -0500 |
commit | 54823fe6b93d75a90cd627e3852669b5721fdd1f (patch) | |
tree | 1994de8ea2c20ef85a305899914e50e8d04ecf10 | |
parent | 0afd5850f5bba4bd3f1218e27a4a1488c9fdb83e (diff) | |
download | rails-54823fe6b93d75a90cd627e3852669b5721fdd1f.tar.gz rails-54823fe6b93d75a90cd627e3852669b5721fdd1f.tar.bz2 rails-54823fe6b93d75a90cd627e3852669b5721fdd1f.zip |
Use sprockets prepend_path if its available
-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| |