aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-09 14:02:53 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-05-09 14:03:02 -0700
commit20d5ebfb80ab68f0b1d6e0ff25132bf97a2fc546 (patch)
tree05ac3567af01ddf71173b2d679cbc256413531fd
parent074c8ef38e333db1e97ac6b0136e76854fc28632 (diff)
downloadrails-20d5ebfb80ab68f0b1d6e0ff25132bf97a2fc546.tar.gz
rails-20d5ebfb80ab68f0b1d6e0ff25132bf97a2fc546.tar.bz2
rails-20d5ebfb80ab68f0b1d6e0ff25132bf97a2fc546.zip
use unless and || since these options are boolean
-rw-r--r--actionpack/lib/action_dispatch/http/url.rb2
1 files changed, 1 insertions, 1 deletions
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