Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move config.default_asset_host_protocol to the railtie.

  • Loading branch information...
commit 9370855d54cb00a0e740949104d3add55f17656a 1 parent d7be017
José Valim josevalim authored
7 actionpack/lib/sprockets/helpers/rails_helper.rb
View
@@ -9,13 +9,8 @@ module RailsHelper
def asset_paths
@asset_paths ||= begin
config = self.config if respond_to?(:config)
+ config ||= Rails.application.config
controller = self.controller if respond_to?(:controller)
- config ||= Rails.application.config
- if config.action_controller.present?
- config.action_controller.default_asset_host_protocol ||= :relative
- else
- config.default_asset_host_protocol ||= :relative
- end
paths = RailsHelper::AssetPaths.new(config, controller)
paths.asset_environment = asset_environment
paths.asset_prefix = asset_prefix
2  actionpack/lib/sprockets/railtie.rb
View
@@ -5,6 +5,8 @@ module Sprockets
# TODO: Get rid of config.assets.enabled
class Railtie < ::Rails::Railtie
+ config.default_asset_host_protocol = :relative
+
rake_tasks do
load "sprockets/assets.rake"
end
Please sign in to comment.
Something went wrong with that request. Please try again.