From 20d5ebfb80ab68f0b1d6e0ff25132bf97a2fc546 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 9 May 2014 14:02:53 -0700 Subject: use unless and || since these options are boolean --- actionpack/lib/action_dispatch/http/url.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index 6f5a52c568..ce21d98174 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -55,7 +55,7 @@ module ActionDispatch private def build_host_url(options) - if options[:host].blank? && options[:only_path].blank? + unless options[:host] || options[:only_path] raise ArgumentError, 'Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true' end -- cgit v1.2.3