Skip to content

Commit

Permalink
Merge pull request #15445 from krautcomputing/fix_asset_host_docs
Browse files Browse the repository at this point in the history
Update documentation for setting asset_host to a Proc [ci skip]
  • Loading branch information
Zachary Scott committed May 31, 2014
2 parents 3051356 + f7b0f4f commit 7c63947
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion actionview/lib/action_view/helpers/asset_url_helper.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ module Helpers
# still sending assets for plain HTTP requests from asset hosts. If you don't # still sending assets for plain HTTP requests from asset hosts. If you don't
# have SSL certificates for each of the asset hosts this technique allows you # have SSL certificates for each of the asset hosts this technique allows you
# to avoid warnings in the client about mixed media. # to avoid warnings in the client about mixed media.
# Note that the request parameter might not be supplied, e.g. when the assets
# are precompiled via a Rake task. Make sure to use a Proc instead of a lambda,
# since a Proc allows missing parameters and sets them to nil.
# #
# config.action_controller.asset_host = Proc.new { |source, request| # config.action_controller.asset_host = Proc.new { |source, request|
# if request.ssl? # if request && request.ssl?
# "#{request.protocol}#{request.host_with_port}" # "#{request.protocol}#{request.host_with_port}"
# else # else
# "#{request.protocol}assets.example.com" # "#{request.protocol}assets.example.com"
Expand Down

0 comments on commit 7c63947

Please sign in to comment.