lib/url_for.rb in bartt-ssl_requirement-1.2.4 vs lib/url_for.rb in bartt-ssl_requirement-1.2.5

- old
+ new

@@ -34,10 +34,10 @@ # if full URL is requested for http and we've been told to use a # non-ssl host override, then use it def url_for_with_non_ssl_host(options) if !options[:only_path] && !SslRequirement.non_ssl_host.nil? - if !(/^https/ =~ (options[:protocol] || @request.protocol)) + if !(/^https/ =~ (options[:protocol] || @request.try(:protocol))) options.merge! :host => SslRequirement.non_ssl_host end end url_for_without_non_ssl_host(options) end