aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-08 01:05:28 +0200
committerXavier Noria <fxn@hashref.com>2016-08-08 01:12:38 +0200
commita9dc45459abcd9437085f4dd0aa3c9d0e64e062f (patch)
treefe160bcd744ad3dffbe901a4b44df2c2343130de /actionpack/lib/action_controller/metal
parentb45c9ca9b6571108242c1dfc3d3e160f56baf025 (diff)
downloadrails-a9dc45459abcd9437085f4dd0aa3c9d0e64e062f.tar.gz
rails-a9dc45459abcd9437085f4dd0aa3c9d0e64e062f.tar.bz2
rails-a9dc45459abcd9437085f4dd0aa3c9d0e64e062f.zip
code gardening: removes redundant selfs
A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r--actionpack/lib/action_controller/metal/head.rb2
-rw-r--r--actionpack/lib/action_controller/metal/instrumentation.rb2
-rw-r--r--actionpack/lib/action_controller/metal/rendering.rb2
-rw-r--r--actionpack/lib/action_controller/metal/strong_parameters.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/head.rb b/actionpack/lib/action_controller/metal/head.rb
index 97306b5265..86b5eb20d7 100644
--- a/actionpack/lib/action_controller/metal/head.rb
+++ b/actionpack/lib/action_controller/metal/head.rb
@@ -41,7 +41,7 @@ module ActionController
self.response_body = ""
- if include_content?(self.response_code)
+ if include_content?(response_code)
self.content_type = content_type || (Mime[formats.first] if formats)
self.response.charset = false
end
diff --git a/actionpack/lib/action_controller/metal/instrumentation.rb b/actionpack/lib/action_controller/metal/instrumentation.rb
index 6a8129e88b..2ede96c667 100644
--- a/actionpack/lib/action_controller/metal/instrumentation.rb
+++ b/actionpack/lib/action_controller/metal/instrumentation.rb
@@ -17,7 +17,7 @@ module ActionController
def process_action(*args)
raw_payload = {
controller: self.class.name,
- action: self.action_name,
+ action: action_name,
params: request.filtered_parameters,
headers: request.headers,
format: request.format.ref,
diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb
index 41b166b346..ac17d61b96 100644
--- a/actionpack/lib/action_controller/metal/rendering.rb
+++ b/actionpack/lib/action_controller/metal/rendering.rb
@@ -32,7 +32,7 @@ module ActionController
# Check for double render errors and set the content_type after rendering.
def render(*args) #:nodoc:
- raise ::AbstractController::DoubleRenderError if self.response_body
+ raise ::AbstractController::DoubleRenderError if response_body
super
end
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb
index 32ab8ca2ac..7f5144bc49 100644
--- a/actionpack/lib/action_controller/metal/strong_parameters.rb
+++ b/actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -719,7 +719,7 @@ module ActionController
end
def unpermitted_keys(params)
- self.keys - params.keys - self.always_permitted_parameters
+ keys - params.keys - always_permitted_parameters
end
#