Skip to content

Instantly share code, notes, and snippets.

@fsvehla
Created November 3, 2010 10:34
Show Gist options
  • Save fsvehla/660943 to your computer and use it in GitHub Desktop.
Save fsvehla/660943 to your computer and use it in GitHub Desktop.
def call(source, request)
if request.ssl?
case
when javascript_file?(source)
ssl_asset_host(source)
when safari?(request)
asset_host(source)
when firefox?(request) && image_file?(source)
asset_host(source)
else
ssl_asset_host(source)
end
else
asset_host(source)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment