diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-28 15:50:22 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-28 15:50:22 -0700 |
commit | 353df48a341953b1bf457aa6f871a6054d6f64ba (patch) | |
tree | 6709390e87de3dc7e24050aa46104bbedbc2a679 /actionpack/lib | |
parent | c99d28f1f223e87523559f071eca2d84ac41f14c (diff) | |
download | rails-353df48a341953b1bf457aa6f871a6054d6f64ba.tar.gz rails-353df48a341953b1bf457aa6f871a6054d6f64ba.tar.bz2 rails-353df48a341953b1bf457aa6f871a6054d6f64ba.zip |
fewer blank? calls
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 178728ea2a..6b6e27ceb0 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -265,14 +265,14 @@ module ActionDispatch if controller.is_a? Regexp hash[:controller] = controller else - check_controller! controller.to_s + check_controller! controller hash[:controller] = controller.to_s if controller end if action.is_a? Regexp hash[:action] = action else - check_action! action.to_s + check_action! action hash[:action] = action.to_s if action end @@ -281,7 +281,7 @@ module ActionDispatch end def check_action!(action) - if action.blank? && segment_keys.exclude?(:action) + if action.nil? && segment_keys.exclude?(:action) message = "Missing :action key on routes definition, please check your routes." raise ArgumentError, message end @@ -292,7 +292,7 @@ module ActionDispatch raise ArgumentError, "controller name should not start with a slash" end - if controller.blank? && segment_keys.exclude?(:controller) + if controller.nil? && segment_keys.exclude?(:controller) message = "Missing :controller key on routes definition, please check your routes." raise ArgumentError, message end |