aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionmailer/CHANGELOG.md28
-rw-r--r--actionview/CHANGELOG.md4
-rw-r--r--activejob/CHANGELOG.md17
-rw-r--r--activejob/lib/active_job/core.rb6
-rw-r--r--activerecord/test/cases/associations/has_one_associations_test.rb2
-rw-r--r--activesupport/CHANGELOG.md14
-rw-r--r--guides/source/testing.md2
7 files changed, 40 insertions, 33 deletions
diff --git a/actionmailer/CHANGELOG.md b/actionmailer/CHANGELOG.md
index 2f9c0dd7a3..ba9e1b0607 100644
--- a/actionmailer/CHANGELOG.md
+++ b/actionmailer/CHANGELOG.md
@@ -1,24 +1,24 @@
-* Template lookup now respect default locale and I18n fallbacks.
+* Template lookup now respects default locale and I18n fallbacks.
- Given the following templates:
+ Given the following templates:
- mailer/demo.html.erb
- mailer/demo.en.html.erb
- mailer/demo.pt.html.erb
+ mailer/demo.html.erb
+ mailer/demo.en.html.erb
+ mailer/demo.pt.html.erb
- Before this change for a locale that doesn't have its related file the `mailer/demo.html.erb` will
- be rendered even if `en` is the default locale.
+ Before this change, for a locale that doesn't have its associated file, the
+ `mailer/demo.html.erb` would be rendered even if `en` was the default locale.
- Now `mailer/demo.en.html.erb` has precedence over the file without locale.
+ Now `mailer/demo.en.html.erb` has precedence over the file without locale.
- Also, it is possible to give a fallback.
+ Also, it is possible to give a fallback.
- mailer/demo.pt.html.erb
- mailer/demo.pt-BR.html.erb
+ mailer/demo.pt.html.erb
+ mailer/demo.pt-BR.html.erb
- So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be rendered given the right I18n
- fallback configuration.
+ So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be rendered given
+ the right I18n fallback configuration.
- *Rafael Mendonça França*
+ *Rafael Mendonça França*
Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionmailer/CHANGELOG.md) for previous changes.
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md
index fb39ac7508..d71f29d7b0 100644
--- a/actionview/CHANGELOG.md
+++ b/actionview/CHANGELOG.md
@@ -1,5 +1,5 @@
-* Added an explicit error message, in `ActionView::PartialRenderer`
- for partial `rendering`, when the value of option `as` has invalid characters.
+* Add an explicit error message, in `ActionView::PartialRenderer` for partial
+ `rendering`, when the value of option `as` has invalid characters.
*Angelo Capilleri*
diff --git a/activejob/CHANGELOG.md b/activejob/CHANGELOG.md
index c9d9484518..afdd42be33 100644
--- a/activejob/CHANGELOG.md
+++ b/activejob/CHANGELOG.md
@@ -1,8 +1,9 @@
-* `ActiveJob::Base.deserialize` delegates to the job class
+* `ActiveJob::Base.deserialize` delegates to the job class
- Since `ActiveJob::Base#deserialize` can be overriden by subclasses (like `ActiveJob::Base#serialize`)
- this allows jobs to attach arbitrary metadata when they get serialized and read it back when they get
- performed. E.g.
+
+ Since `ActiveJob::Base#deserialize` can be overridden by subclasses (like
+ `ActiveJob::Base#serialize`) this allows jobs to attach arbitrary metadata
+ when they get serialized and read it back when they get performed. Example:
class DeliverWebhookJob < ActiveJob::Base
def serialize
@@ -10,17 +11,17 @@
end
def deserialize(job_data)
- super(job_data)
+ super
@attempt_number = job_data['attempt_number']
end
- rescue_from(TimeoutError) do |ex|
- raise ex if @attempt_number > 5
+ rescue_from(TimeoutError) do |exception|
+ raise exception if @attempt_number > 5
retry_job(wait: 10)
end
end
- *Isaac Seymour*
+ *Isaac Seymour*
Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/activejob/CHANGELOG.md) for previous changes.
diff --git a/activejob/lib/active_job/core.rb b/activejob/lib/active_job/core.rb
index 450c56bfdc..ddd7d1361c 100644
--- a/activejob/lib/active_job/core.rb
+++ b/activejob/lib/active_job/core.rb
@@ -78,12 +78,12 @@ module ActiveJob
# end
#
# def deserialize(job_data)
- # super(job_data)
+ # super
# @attempt_number = job_data['attempt_number']
# end
#
- # rescue_from(TimeoutError) do |ex|
- # raise ex if @attempt_number > 5
+ # rescue_from(TimeoutError) do |exception|
+ # raise exception if @attempt_number > 5
# retry_job(wait: 10)
# end
# end
diff --git a/activerecord/test/cases/associations/has_one_associations_test.rb b/activerecord/test/cases/associations/has_one_associations_test.rb
index 15b37ad709..9b6757e256 100644
--- a/activerecord/test/cases/associations/has_one_associations_test.rb
+++ b/activerecord/test/cases/associations/has_one_associations_test.rb
@@ -577,7 +577,7 @@ class HasOneAssociationsTest < ActiveRecord::TestCase
def test_has_one_loading_for_new_record
post = Post.create!(author_id: 42, title: 'foo', body: 'bar')
author = Author.new(id: 42)
- assert author.post
+ assert_equal post, author.post
end
def test_has_one_relationship_cannot_have_a_counter_cache
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index f0ccdb1f21..709e497a6d 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,4 +1,5 @@
-* Added support for error dispatcher classes in `ActiveSupport::Rescuable`. Now it acts closer to Ruby's rescue.
+* Add support for error dispatcher classes in `ActiveSupport::Rescuable`.
+ Now it acts closer to Ruby's rescue.
class BaseController < ApplicationController
module ErrorDispatcher
@@ -14,11 +15,16 @@
*Genadi Samokovarov*
-* Added `#verified` and `#valid_message?` methods to `ActiveSupport::MessageVerifier`
+* Add `#verified` and `#valid_message?` methods to `ActiveSupport::MessageVerifier`
- Previously, the only way to decode a message with `ActiveSupport::MessageVerifier` was to use `#verify`, which would raise an exception on invalid messages. Now `#verified` can also be used, which returns `nil` on messages that cannot be decoded.
+ Previously, the only way to decode a message with `ActiveSupport::MessageVerifier`
+ was to use `#verify`, which would raise an exception on invalid messages. Now
+ `#verified` can also be used, which returns `nil` on messages that cannot be
+ decoded.
- Previously, there was no way to check if a message's format was valid without attempting to decode it. `#valid_message?` is a boolean convenience method that checks whether the message is valid without actually decoding it.
+ Previously, there was no way to check if a message's format was valid without
+ attempting to decode it. `#valid_message?` is a boolean convenience method that
+ checks whether the message is valid without actually decoding it.
*Logan Leger*
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 2d66840306..21b0b37efa 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -789,7 +789,7 @@ end
I've added this file here `test/controllers/articles_routes_test.rb` and if we run the test we should see:
```bash
-$ be rake test test/controllers/articles_routes_test.rb
+$ bin/rake test test/controllers/articles_routes_test.rb
# Running: