From 9286d422f8aff0aff8529edc93966fcab987c1af Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sat, 23 May 2009 02:29:44 +0200 Subject: Add asset_host to Rails2Compatibility --- actionpack/lib/action_controller/new_base/compatibility.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/lib/action_controller/new_base') diff --git a/actionpack/lib/action_controller/new_base/compatibility.rb b/actionpack/lib/action_controller/new_base/compatibility.rb index 250e7f0dff..2bc76338b9 100644 --- a/actionpack/lib/action_controller/new_base/compatibility.rb +++ b/actionpack/lib/action_controller/new_base/compatibility.rb @@ -56,6 +56,12 @@ module ActionController cattr_accessor :consider_all_requests_local self.consider_all_requests_local = true + + # Prepends all the URL-generating helpers from AssetHelper. This makes it possible to easily move javascripts, stylesheets, + # and images to a dedicated asset server away from the main web server. Example: + # ActionController::Base.asset_host = "http://assets.example.com" + @@asset_host = "" + cattr_accessor :asset_host end # For old tests -- cgit v1.2.3