diff options
author | Milan Dobrota <mdobrota@tribune.com> | 2011-09-04 10:44:08 -0500 |
---|---|---|
committer | Milan Dobrota <mdobrota@tribune.com> | 2011-09-04 10:44:08 -0500 |
commit | 9b08afd2f4d501fb1710ba0ed4e19313093605c8 (patch) | |
tree | 93c181f5831e772f6ab044516fb36be43dbd3aa3 /actionpack/lib/action_controller/metal | |
parent | abb09054043c556ae38d2c9d1e9037eceb6dc426 (diff) | |
download | rails-9b08afd2f4d501fb1710ba0ed4e19313093605c8.tar.gz rails-9b08afd2f4d501fb1710ba0ed4e19313093605c8.tar.bz2 rails-9b08afd2f4d501fb1710ba0ed4e19313093605c8.zip |
if ... nil? is more expensive than unless
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r-- | actionpack/lib/action_controller/metal/redirecting.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb index 4f311a1cf5..f2dfb3833b 100644 --- a/actionpack/lib/action_controller/metal/redirecting.rb +++ b/actionpack/lib/action_controller/metal/redirecting.rb @@ -57,7 +57,7 @@ module ActionController # When using <tt>redirect_to :back</tt>, if there is no referrer, RedirectBackError will be raised. You may specify some fallback # behavior for this case by rescuing RedirectBackError. def redirect_to(options = {}, response_status = {}) #:doc: - raise ActionControllerError.new("Cannot redirect to nil!") if options.nil? + raise ActionControllerError.new("Cannot redirect to nil!") unless options raise AbstractController::DoubleRenderError if response_body self.status = _extract_redirect_to_status(options, response_status) |