2018/11/29分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Merge pull request #34557 from sergioisidoro/sergio-patch-load-error
activerecord/lib/active_record/connection_adapters/connection_specification.rb
の修正です。
ConnectionSpecification::Resolver#spec
メソッドで、指定されたadapterがrequire出来なかった場合にLoadError
をrescueして適切なエラーメッセージ(adapter名が誤っている or gemの指定が不足している等々)を出すようになっているのですが、その際にraiseするrescueしたclassを使用していたのを、LoadError
を使用するよう修正しています。
- raise e.class, "Could not load the '#{spec[:adapter]}' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile.", e.backtrace + raise LoadError, "Could not load the '#{spec[:adapter]}' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile.", e.backtrace
ExceptionがMissingSpecError
のケースがある、かつ、MissingSpecError
をraiseする引数が足りず(MissingSpecError
は引数が2つ必要)、結果ここでArgumentError
が発生してしまう、という問題があった為、Exceptionに関わらずLoadError
をraiseするようにしています。
Add autoload hook for AbstractController::ActionNotFound
actionpack/lib/abstract_controller.rb
の修正です。
autoloadの対象にActionNotFound
を追加しています。
autoloadの対象にしておかないと、action_controller
を単体でrequireした際にNameError
が発生してしまう為。
Merge pull request #34534 from gmcgibbon/ar_query_scope_body_doc
rails guideのActive Record Query Interface
の修正です。
Scopes
の項に、scopeはActiveRecord::Relation
を返すべき、という説明があるのですが、実際はnil
でも良いため、その旨説目を修正しています。
Allow spaces in postgres table names
activerecord/lib/active_record/connection_adapters/postgresql/utils.rb
の修正です。
PostgreSQL adapterでテーブル名にスペースを使用出来ない(スペースを使用したら、スペースより前の部分がschemaと扱われてしまっていた)バグがあったのを修正しています。
Merge pull request #34554 from sj26/group-exception-logs
actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
の修正です。
ActionDispatch::DebugExceptions
でログの書き込みを行う際に、1項目ごとにログの書き込みを行っていたのを、データをまとめて書き込むよう修正しています。
項目ごとに書き込みを行うと、他の書き込みが発生した場合にログが混ざりわかりずらくなってしまう為。
Merge pull request #34562 from ruralocity/active-record-query-docs-improvement
activerecord/lib/active_record/querying.rb
のdocの集合です。
ActiveRecord::Querying
のdocの言い回し、フォーマット等の修正を行っています。
[ci skip] Add a Delayed Job project link.
rails guideのActive Job Basics
の集合です。
Starting the Backend
の項に記載されているバックエンドの一覧にDelayed Jobを追加しています。