aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2011-03-29 18:05:23 -0500
committerJoshua Peek <josh@joshpeek.com>2011-03-29 18:05:23 -0500
commitdb3e310d6b327b2b58cfbc0318abd3b4ddca5e30 (patch)
treeabc6b2426de401a93b9517be8c6ac8d2ffdff0e3
parent8e4d0b118bbcdfe6b41d15400d092c871c5a1114 (diff)
downloadrails-db3e310d6b327b2b58cfbc0318abd3b4ddca5e30.tar.gz
rails-db3e310d6b327b2b58cfbc0318abd3b4ddca5e30.tar.bz2
rails-db3e310d6b327b2b58cfbc0318abd3b4ddca5e30.zip
Change back to /assets prefix
-rw-r--r--actionpack/lib/action_view/helpers/sprockets_helper.rb4
-rw-r--r--railties/lib/rails/engine.rb19
2 files changed, 10 insertions, 13 deletions
diff --git a/actionpack/lib/action_view/helpers/sprockets_helper.rb b/actionpack/lib/action_view/helpers/sprockets_helper.rb
index 9fd5f6759c..4f19f4bb21 100644
--- a/actionpack/lib/action_view/helpers/sprockets_helper.rb
+++ b/actionpack/lib/action_view/helpers/sprockets_helper.rb
@@ -4,7 +4,7 @@ module ActionView
module Helpers
module SprocketsHelper
def sprockets_javascript_path(source)
- compute_sprockets_path source, 'javascripts', 'js'
+ compute_sprockets_path source, 'assets', 'js'
end
def sprockets_javascript_include_tag(source, options = {})
@@ -17,7 +17,7 @@ module ActionView
end
def sprockets_stylesheet_path(source)
- compute_sprockets_path source, 'stylesheets', 'css'
+ compute_sprockets_path source, 'assets', 'css'
end
def sprockets_stylesheet_link_tag(source, options = {})
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|