Skip to content
This repository
Browse code

Change back to /assets prefix

  • Loading branch information...
commit db3e310d6b327b2b58cfbc0318abd3b4ddca5e30 1 parent 8e4d0b1
Joshua Peek authored March 29, 2011
4  actionpack/lib/action_view/helpers/sprockets_helper.rb
@@ -4,7 +4,7 @@ module ActionView
4 4
   module Helpers
5 5
     module SprocketsHelper
6 6
       def sprockets_javascript_path(source)
7  
-        compute_sprockets_path source, 'javascripts', 'js'
  7
+        compute_sprockets_path source, 'assets', 'js'
8 8
       end
9 9
 
10 10
       def sprockets_javascript_include_tag(source, options = {})
@@ -17,7 +17,7 @@ def sprockets_javascript_include_tag(source, options = {})
17 17
       end
18 18
 
19 19
       def sprockets_stylesheet_path(source)
20  
-        compute_sprockets_path source, 'stylesheets', 'css'
  20
+        compute_sprockets_path source, 'assets', 'css'
21 21
       end
22 22
 
23 23
       def sprockets_stylesheet_link_tag(source, options = {})
19  railties/lib/rails/engine.rb
@@ -444,7 +444,7 @@ def build_route_set
444 444
       engine = self
445 445
       routes.append do
446 446
         if engine.config.use_sprockets
447  
-          routes.add_route(engine.assets, {}, {}, {}, nil, false)
  447
+          routes.add_route(engine.assets, {:path_info => "/assets"}, {}, {}, nil, false)
448 448
         end
449 449
       end
450 450
 
@@ -453,15 +453,12 @@ def build_route_set
453 453
 
454 454
     def self.default_sprockets_paths
455 455
       [
456  
-       "app/assets",
457  
-       "app/assets/javascripts",
458  
-       "app/assets/stylesheets",
459  
-       "vendor/plugins/*/app/assets",
460  
-       "vendor/plugins/*/app/assets/javascripts",
461  
-       "vendor/plugins/*/app/assets/stylesheets",
462  
-       "vendor/plugins/*/assets",
463  
-       "vendor/plugins/*/assets/javascripts",
464  
-       "vendor/plugins/*/assets/stylesheets"
  456
+       "app/javascripts",
  457
+       "app/stylesheets",
  458
+       "vendor/plugins/*/app/javascripts",
  459
+       "vendor/plugins/*/app/stylesheets",
  460
+       "vendor/plugins/*/javascripts",
  461
+       "vendor/plugins/*/stylesheets"
465 462
       ]
466 463
     end
467 464
 
@@ -475,7 +472,7 @@ def build_asset_environment
475 472
       require 'sprockets'
476 473
 
477 474
       env = Sprockets::Environment.new(root.to_s)
478  
-      env.static_root = root.join("public")
  475
+      env.static_root = root.join("public/assets")
479 476
 
480 477
       self.class.default_sprockets_paths.each do |pattern|
481 478
         Dir[root.join(pattern)].each do |dir|

0 notes on commit db3e310

Please sign in to comment.
Something went wrong with that request. Please try again.