Closed PatrickMcSweeny closed 6 years ago
0
is a truthy value in Ruby, so if you are seeing a bug with external asset hosts, I don't think it is because of this.
I was having trouble using this gem with an external asset host because it kept trying to prefix the host name with a "//". I was able to fix this problem by forking the repo, changing that single line and then pointing to my forked gem in the application's Gemfile.
What is your Rails.application.config.action_controller.asset_host
set to? Let's see if we can get to the bottom of this.
This no longer seems to be an issue.
The first line of the conditional in the normalize_host function will always return false because if the regular expression matches it will return 0 which evaluates to false. This pull request fixes the issue by using the present? method which will reliably evaluate to true when the regex matches.