aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/asset_paths.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/asset_paths.rb')
-rw-r--r--actionpack/lib/action_view/asset_paths.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/asset_paths.rb b/actionpack/lib/action_view/asset_paths.rb
index 81880d17ea..3ddd8bd552 100644
--- a/actionpack/lib/action_view/asset_paths.rb
+++ b/actionpack/lib/action_view/asset_paths.rb
@@ -1,6 +1,6 @@
require 'zlib'
require 'active_support/core_ext/file'
-require 'action_controller/metal/exceptions'
+require 'active_support/core_ext/module/delegation'
module ActionView
class AssetPaths #:nodoc:
@@ -8,6 +8,8 @@ module ActionView
attr_reader :config, :controller
+ delegate :invalid_asset_host!, :to => :controller, :prefix => false
+
def initialize(config, controller = nil)
@config = config
@controller = controller
@@ -97,10 +99,6 @@ module ActionView
@config.default_asset_host_protocol || (has_request? ? :request : :relative)
end
- def invalid_asset_host!(help_message)
- raise ActionController::RoutingError, "This asset host cannot be computed without a request in scope. #{help_message}"
- end
-
# Pick an asset host for this source. Returns +nil+ if no host is set,
# the host if no wildcard is set, the host interpolated with the
# numbers 0-3 if it contains <tt>%d</tt> (the number is the source hash mod 4),