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内の外部リンクがコードフォーマットで表示されてしまっていたのを修正しています。