Skip to content

Instantly share code, notes, and snippets.

@tal
Created November 8, 2012 21:22
Show Gist options
  • Select an option

  • Save tal/4041708 to your computer and use it in GitHub Desktop.

Select an option

Save tal/4041708 to your computer and use it in GitHub Desktop.
config.action_controller.asset_host = Proc.new do |source, request=nil|
protocol = request.andand.ssl? ? "https" : "http"
protocol << "://dzb99dkvx454e.cloudfront.net"
end
config.action_controller.asset_host = Proc.new do |source, request=nil|
if request
protocol = request.ssl? ? "https" : "http"
protocol << "://dzb99dkvx454e.cloudfront.net"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment