なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2019/12/04)

2019/12/04分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

activerecord/CHANGELOG.md


Avoid allocating Binding instance in HWIA#convert_value

activesupport/lib/active_support/hash_with_indifferent_access.rbの修正です。

ActiveSupport::HashWithIndifferentAccess#convert_valueメソッドで、Bindingオブジェクトを生成していたのを、Bindingを使用しないようリファクタリングしています。


Fix bug in configs_for

activerecord/lib/active_record/database_configurations.rbの修正です。

configs_forメソッドにspec_nameだけを指定した場合に、spec_nameに一致した最初のconfigを返すようになっていたのを、default envを使用してenvとspec両方に一致した値を返すよう修正しています。


Deprecate database kwarg from connected_to without replacement

activerecord/lib/active_record/connection_handling.rbの修正です。

connected_toメソッドのdatabaseキーワード引数がdeprecateになりました。

シャーディングを使用する場合に使用することが出来ない、かつ、リクエストの最中にdatabaseを指定した場合に正しく動作しないバグがあったりした為、との事です。違うDBへの新しいコネクションが必要な場合、connects_toメソッドを使用する必要があります。


Hide internal utility methods in the public API doc [ci skip]

activesupport/lib/active_support/hash_with_indifferent_access.rbの修正です。

内部用メソッドであるconvert_keyconvert_valueset_defaultsAPI docに表示されないよう修正しています。


Merge pull request #37879 from tomily1/update-initialization-guide

rails guideのThe Rails Initialization Processの修正です。

Rails::Server#startのコードについて説明している箇所の内容を、実際のコードと一致するよう修正しています。


Update active_storage_overview.md

rails guideのActive Storage Overviewの修正です。

Microsoft Azure Storage Serviceを使用したい場合に必要なgemの名前を修正(azure-storage-blob -> azure-storage)しています。が、これは修正前が正しいです。