Skip to content
This repository
Browse code

config.action_controller.asset_host shouldn't set to nil during preco…

…mpile
  • Loading branch information...
commit b50394bf844d0520d5dca485b169bba87f6d009a 1 parent 8a32a58
Guillermo Iguaran authored September 15, 2011
3  actionpack/lib/sprockets/assets.rake
@@ -17,9 +17,6 @@ namespace :assets do
17 17
       # Always compile files
18 18
       Rails.application.config.assets.compile = true
19 19
 
20  
-      # Always ignore asset host
21  
-      Rails.application.config.action_controller.asset_host = nil
22  
-
23 20
       config = Rails.application.config
24 21
       env    = Rails.application.assets
25 22
       target = Pathname.new(File.join(Rails.public_path, config.assets.prefix))
14  railties/test/application/assets_test.rb
@@ -270,20 +270,6 @@ class ::PostsController < ActionController::Base ; end
270 270
       assert_match(/\/assets\/rails-([0-z]+)\.png/, File.read(file))
271 271
     end
272 272
 
273  
-    test "precompile ignore asset_host" do
274  
-      app_file "app/assets/javascripts/application.css.erb", "<%= asset_path 'rails.png' %>"
275  
-      add_to_config "config.action_controller.asset_host = Proc.new { |source, request| 'http://www.example.com/' }"
276  
-
277  
-      capture(:stdout) do
278  
-        Dir.chdir(app_path){ `bundle exec rake assets:precompile` }
279  
-      end
280  
-
281  
-      file = Dir["#{app_path}/public/assets/application.css"].first
282  
-      content = File.read(file)
283  
-      assert_match(/\/assets\/rails.png/, content)
284  
-      assert_no_match(/www\.example\.com/, content)
285  
-    end
286  
-
287 273
     test "precompile should handle utf8 filenames" do
288 274
       app_file "app/assets/images/レイルズ.png", "not a image really"
289 275
       add_to_config "config.assets.precompile = [ /\.png$$/, /application.(css|js)$/ ]"

0 notes on commit b50394b

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