Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Update documentation for setting asset_host to a Proc, mention that t…

…he request parameter might not be supplied [ci skip]
  • Loading branch information...
1 parent 3051356 commit f7b0f4f1e0a732ff70f3704007536bf1c49fce12 @manuelmeurer manuelmeurer committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 actionview/lib/action_view/helpers/asset_url_helper.rb
5 actionview/lib/action_view/helpers/asset_url_helper.rb
@@ -88,9 +88,12 @@ module Helpers
# 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
# 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 = { |source, request|
- # if request.ssl?
+ # if request && request.ssl?
# "#{request.protocol}#{request.host_with_port}"
# else
# "#{request.protocol}"

0 comments on commit f7b0f4f

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