aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-09-01 23:41:49 +0200
committerXavier Noria <fxn@hashref.com>2016-09-01 23:41:49 +0200
commitbb1ecdcc677bf6e68e0252505509c089619b5b90 (patch)
tree99dd8fd164e1c582216a4b08c3d066049217bb7f /actionpack/lib/action_controller/metal
parent8c402ef425771c3dbb4659dd946714e69fdf5ce9 (diff)
downloadrails-bb1ecdcc677bf6e68e0252505509c089619b5b90.tar.gz
rails-bb1ecdcc677bf6e68e0252505509c089619b5b90.tar.bz2
rails-bb1ecdcc677bf6e68e0252505509c089619b5b90.zip
fixes remaining RuboCop issues [Vipul A M, Xavier Noria]
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r--actionpack/lib/action_controller/metal/data_streaming.rb2
-rw-r--r--actionpack/lib/action_controller/metal/implicit_render.rb2
-rw-r--r--actionpack/lib/action_controller/metal/redirecting.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal/data_streaming.rb b/actionpack/lib/action_controller/metal/data_streaming.rb
index 6a1acb64f7..f089c8423b 100644
--- a/actionpack/lib/action_controller/metal/data_streaming.rb
+++ b/actionpack/lib/action_controller/metal/data_streaming.rb
@@ -64,7 +64,7 @@ module ActionController #:nodoc:
# http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
# for the Cache-Control header spec.
def send_file(path, options = {}) #:doc:
- raise MissingFile, "Cannot read file #{path}" unless File.file?(path) and File.readable?(path)
+ raise MissingFile, "Cannot read file #{path}" unless File.file?(path) && File.readable?(path)
options[:filename] ||= File.basename(path) unless options[:url_based_filename]
send_file_headers! options
diff --git a/actionpack/lib/action_controller/metal/implicit_render.rb b/actionpack/lib/action_controller/metal/implicit_render.rb
index 4137db99ea..e7e32e5108 100644
--- a/actionpack/lib/action_controller/metal/implicit_render.rb
+++ b/actionpack/lib/action_controller/metal/implicit_render.rb
@@ -61,7 +61,7 @@ module ActionController
def method_for_action(action_name)
super || if template_exists?(action_name.to_s, _prefixes)
- "default_render"
+ "default_render"
end
end
diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb
index 3c7cc15627..2bd4296aff 100644
--- a/actionpack/lib/action_controller/metal/redirecting.rb
+++ b/actionpack/lib/action_controller/metal/redirecting.rb
@@ -111,7 +111,7 @@ module ActionController
`fallback_location` represents the location to use if the request has
no HTTP referer information.
MESSAGE
- request.headers["Referer"] or raise RedirectBackError
+ request.headers["Referer"] || raise(RedirectBackError)
when Proc
_compute_redirect_to_location request, options.call
else