aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actioncable/CHANGELOG.md2
-rw-r--r--actionpack/CHANGELOG.md10
-rw-r--r--actionpack/lib/action_controller/metal/parameter_encoding.rb6
-rw-r--r--actionpack/lib/action_dispatch/http/headers.rb2
-rw-r--r--actionpack/lib/action_dispatch/http/parameters.rb22
-rw-r--r--actionview/CHANGELOG.md2
-rw-r--r--activejob/CHANGELOG.md2
-rw-r--r--activerecord/CHANGELOG.md7
-rw-r--r--activesupport/CHANGELOG.md6
9 files changed, 31 insertions, 28 deletions
diff --git a/actioncable/CHANGELOG.md b/actioncable/CHANGELOG.md
index cc15e9bf61..dec6f7c027 100644
--- a/actioncable/CHANGELOG.md
+++ b/actioncable/CHANGELOG.md
@@ -3,7 +3,7 @@
*Tinco Andringa*
-* Add ActiveSupport::Notifications hook to Broadcaster#broadcast
+* Add ActiveSupport::Notifications hook to Broadcaster#broadcast.
*Matthew Wear*
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index 5724e24bd5..1fb7e20417 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -28,10 +28,10 @@
*David Chen*
-* Fix 'defaults' option for root route.
+* Fix `defaults` option for root route.
A regression from some refactoring for the 5.0 release, this change
- fixes the use of 'defaults' (default parameters) in the 'root' routing method.
+ fixes the use of `defaults` (default parameters) in the `root` routing method.
*Chris Arcand*
@@ -45,16 +45,16 @@
*Grey Baker*
-* Don't raise ActionController::UnknownHttpMethod from ActionDispatch::Static
+* Don't raise `ActionController::UnknownHttpMethod` from `ActionDispatch::Static`.
Pass `Rack::Request` objects to `ActionDispatch::FileHandler` to avoid it
raising `ActionController::UnknownHttpMethod`. If an unknown method is
- passed, it should exception higher in the stack instead, once we've had a
+ passed, it should pass exception higher in the stack instead, once we've had a
chance to define exception handling behaviour.
*Grey Baker*
-* Handle `Rack::QueryParser` errors in `ActionDispatch::ExceptionWrapper`
+* Handle `Rack::QueryParser` errors in `ActionDispatch::ExceptionWrapper`.
Updated `ActionDispatch::ExceptionWrapper` to handle the Rack 2.0 namespace
for `ParameterTypeError` and `InvalidParameterError` errors.
diff --git a/actionpack/lib/action_controller/metal/parameter_encoding.rb b/actionpack/lib/action_controller/metal/parameter_encoding.rb
index 75d92087a8..a278c5d011 100644
--- a/actionpack/lib/action_controller/metal/parameter_encoding.rb
+++ b/actionpack/lib/action_controller/metal/parameter_encoding.rb
@@ -4,16 +4,16 @@ module ActionController
extend ActiveSupport::Concern
module ClassMethods
- def inherited(klass)
+ def inherited(klass) # :nodoc:
super
klass.setup_param_encode
end
- def setup_param_encode
+ def setup_param_encode # :nodoc:
@_parameter_encodings = {}
end
- def encoding_for_param(action, param)
+ def encoding_for_param(action, param) # :nodoc:
if @_parameter_encodings[action.to_s] && @_parameter_encodings[action.to_s][param.to_s]
@_parameter_encodings[action.to_s][param.to_s]
else
diff --git a/actionpack/lib/action_dispatch/http/headers.rb b/actionpack/lib/action_dispatch/http/headers.rb
index 91c45767ef..d5eef2987d 100644
--- a/actionpack/lib/action_dispatch/http/headers.rb
+++ b/actionpack/lib/action_dispatch/http/headers.rb
@@ -3,7 +3,7 @@ module ActionDispatch
# Provides access to the request's HTTP headers from the environment.
#
# env = { "CONTENT_TYPE" => "text/plain", "HTTP_USER_AGENT" => "curl/7.43.0" }
- # headers = ActionDispatch::Http::Headers.new(env)
+ # headers = ActionDispatch::Http::Headers.from_hash(env)
# headers["Content-Type"] # => "text/plain"
# headers["User-Agent"] # => "curl/7.43.0"
#
diff --git a/actionpack/lib/action_dispatch/http/parameters.rb b/actionpack/lib/action_dispatch/http/parameters.rb
index a9d1a501ab..42e80b9bf5 100644
--- a/actionpack/lib/action_dispatch/http/parameters.rb
+++ b/actionpack/lib/action_dispatch/http/parameters.rb
@@ -43,17 +43,6 @@ module ActionDispatch
end
alias :params :parameters
- def set_custom_encoding(params)
- action = params[:action]
- params.each do |k, v|
- if v.is_a?(String) && v.encoding != encoding_template(action, k)
- params[k] = v.force_encoding(encoding_template(action, k))
- end
- end
-
- params
- end
-
def path_parameters=(parameters) #:nodoc:
delete_header("action_dispatch.request.parameters")
@@ -76,6 +65,17 @@ module ActionDispatch
private
+ def set_custom_encoding(params)
+ action = params[:action]
+ params.each do |k, v|
+ if v.is_a?(String) && v.encoding != encoding_template(action, k)
+ params[k] = v.force_encoding(encoding_template(action, k))
+ end
+ end
+
+ params
+ end
+
def encoding_template(action, param)
controller_class.encoding_for_param(action, param)
end
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md
index 567e77f101..8bd4e1e56c 100644
--- a/actionview/CHANGELOG.md
+++ b/actionview/CHANGELOG.md
@@ -61,7 +61,7 @@
* Change `datetime_field` and `datetime_field_tag` to generate `datetime-local` fields.
As a new specification of the HTML 5 the text field type `datetime` will no longer exist
- and it is recomended to use `datetime-local`.
+ and it is recommended to use `datetime-local`.
Ref: https://html.spec.whatwg.org/multipage/forms.html#local-date-and-time-state-(type=datetime-local)
*Herminio Torres*
diff --git a/activejob/CHANGELOG.md b/activejob/CHANGELOG.md
index 39503caeea..12f9e1cc17 100644
--- a/activejob/CHANGELOG.md
+++ b/activejob/CHANGELOG.md
@@ -1,6 +1,6 @@
## Rails 5.1.0.alpha ##
-* Added declarative exception handling via ActiveJob::Base.retry_on and ActiveJob::Base.discard_on.
+* Added declarative exception handling via `ActiveJob::Base.retry_on` and `ActiveJob::Base.discard_on`.
Examples:
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index dfd9a07997..d0e900c305 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -47,7 +47,9 @@
*Xavier Noria*
* Using `group` with an attribute that has a custom type will properly cast
- the hash keys after calling a calculation method like `count`. Fixes #25595.
+ the hash keys after calling a calculation method like `count`.
+
+ Fixes #25595.
*Sean Griffin*
@@ -81,6 +83,7 @@
*Sean Griffin*
* Ensure hashes can be assigned to attributes created using `composed_of`.
+
Fixes #25210.
*Sean Griffin*
@@ -100,7 +103,7 @@
*Erol Fornoles*
-* PostgreSQL: Fix db:structure:load silent failure on SQL error.
+* PostgreSQL: Fix `db:structure:load` silent failure on SQL error.
The command line flag `-v ON_ERROR_STOP=1` should be used
when invoking `psql` to make sure errors are not suppressed.
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 20db6fb048..163fbdbca6 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -40,10 +40,10 @@
*Xavier Noria*
-* Allow MessageEncryptor to take advantage of authenticated encryption modes.
+* Allow `MessageEncryptor` to take advantage of authenticated encryption modes.
AEAD modes like `aes-256-gcm` provide both confidentiality and data
- authenticity, eliminating the need to use MessageVerifier to check if the
+ authenticity, eliminating the need to use `MessageVerifier` to check if the
encrypted data has been tampered with. This speeds up encryption/decryption
and results in shorter cipher text.
@@ -147,7 +147,7 @@
*Sean Griffin*
-* Introduce Module#delegate_missing_to.
+* Introduce `Module#delegate_missing_to`.
When building a decorator, a common pattern emerges: