2019/12/05分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Distinguish missing controller exceptions from unrelated NameError
Action Packの修正です。
controllerが存在しない場合のエラーと、NameErrorを区別するよう修正しています。controllerが存在しない場合のエラーは、新規に作成したMissingControllerが使用されるようになっています。
元々、controllerの定義内でNameErrorが発生した場合、そのcontroller自体が定義されない状態になっていました。が、Zeitwerkでは、左記のような場合、controller classは定義されるようになりました。
class FooController ::DoesNotExist def index end end
(↑のようなコードがあった場合、元はFooControllerが定義されていない状態になっていたが、ZeitwerkではFooControllerは定義されているが、index actionが存在しない状態になっている)
そのため、controllerが存在しないのか、その他の理由でエラーになっているかを判別出来るようにするために、controllerが存在しない場合のエラーは独自エラークラスを使用するようにしています。
Merge pull request #37876 from Shopify/remove-deprecated-non-symbol-access-to-config_for
railties/lib/rails/application.rbの修正です。
deprecatedになっていた、Rails.application.config_forにStringでkeyを指定した場合の挙動を削除しています。
Merge pull request #37872 from joelhawksley/content-tag-hash-class-conditional
actionview/lib/action_view/helpers/tag_helper.rbの修正です。
TagBuilderにconditional valuesを指定出来るよう修正しています。
例。
content_tag(:div, "Hello world!", class: ["strong", { highlight: current_user.admin? }]) # => <div class="strong highlight">Hello world!</div>
Small doc fixes for ActiveJob::Exceptions::ClassMethods#retry_on
activejob/lib/active_job/exceptions.rbのdocの修正です。
ActiveJob::Exceptions::ClassMethods#retry_onメソッドのdocのフォーマットの修正を行っています。
Merge pull request #37882 from kamipo/should_keep_zero_duration_parts
activesupport/lib/active_support/duration.rbの修正です。
Fix since and ago with a duration which has empty partsの対応により、Dateに対して0 durationの値を加えた場合に、戻り値のクラスがDateではなくActiveSupport::Durationになってしまうバグがあったのを修正しています。
Revert "Merge pull request #37881 from pierredemilly/patch-1"
Microsoft Azure Storage Serviceを使用したい場合に必要なgemの名前を修正(azure-storage-blob -> azure-storage)した、Update active_storage_overview.mdをRevertしています。元の内容(azure-storage-blob)が正しい為。
Add bug report templates for Active Storage
bug report templatesの修正です。
Active Storage用のbug report templatesを追加しています。
guides/bug_report_templates/active_storage_gem.rb、
guides/bug_report_templates/active_storage_master.rbの修正です。
rubocopの設定に違反している箇所があったのを修正しています
Merge pull request #37744 from seejohnrun/around_action-docs
actionpack/test/controller/filters_test.rb、
Rails guidesのAction Controller Overviewの修正です。
guidesにaround_actionにblockを指定した場合の例を追加、及び同様のテストの追加を行っています。
Merge pull request #37693 from elia/patch-1
activerecord/lib/active_record/locking/pessimistic.rbのdocの修正です。
Locking::Locking moduleのdoc内の外部リンクがコードフォーマットで表示されてしまっていたのを修正しています。