From db3e310d6b327b2b58cfbc0318abd3b4ddca5e30 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 29 Mar 2011 18:05:23 -0500 Subject: Change back to /assets prefix --- railties/lib/rails/engine.rb | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'railties/lib/rails/engine.rb') diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 85f7d22fc9..79d48889c9 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -444,7 +444,7 @@ module Rails engine = self routes.append do if engine.config.use_sprockets - routes.add_route(engine.assets, {}, {}, {}, nil, false) + routes.add_route(engine.assets, {:path_info => "/assets"}, {}, {}, nil, false) end end @@ -453,15 +453,12 @@ module Rails def self.default_sprockets_paths [ - "app/assets", - "app/assets/javascripts", - "app/assets/stylesheets", - "vendor/plugins/*/app/assets", - "vendor/plugins/*/app/assets/javascripts", - "vendor/plugins/*/app/assets/stylesheets", - "vendor/plugins/*/assets", - "vendor/plugins/*/assets/javascripts", - "vendor/plugins/*/assets/stylesheets" + "app/javascripts", + "app/stylesheets", + "vendor/plugins/*/app/javascripts", + "vendor/plugins/*/app/stylesheets", + "vendor/plugins/*/javascripts", + "vendor/plugins/*/stylesheets" ] end @@ -475,7 +472,7 @@ module Rails require 'sprockets' env = Sprockets::Environment.new(root.to_s) - env.static_root = root.join("public") + env.static_root = root.join("public/assets") self.class.default_sprockets_paths.each do |pattern| Dir[root.join(pattern)].each do |dir| -- cgit v1.2.3