なるようになるブログ

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

rails commit log流し読み(2021/11/30)

2021/11/30分のコミットです。

CHANGELOGへの追加はありませんでした。


Enhance many? one?

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

many?及びone?メソッドで、limitが指定されている場合はオンメモリの値を使用せず、SQLを実行するよう修正しています。


don't import errors if attempting to merge with self

activemodel/lib/active_model/errors.rbの修正です。

ActiveModel::Error#merge!でmerge先と元が同じオブジェクトの場合、merge処理を実行しないよう修正しています。


Update documentation #any? #many?

rails guideのActive Record Query Interfaceの修正です。

Existence of Objectsの項にあるany?many?で実行されるSQLの例が、実際に実行されるSQLと異なっていたのを修正しています。


Update remove_column docs for how indexes are changed

activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rbのdocの修正です。

remove_columnメソッドのdoc内にある、メソッド実行時のindexに対する処理について、DB毎に挙動が違う旨説明を追加しています。


Fix documentation of Pathname#existence

activesupport/lib/active_support/core_ext/pathname/existence.rbのdocの修正です。

Pathname#existenceメソッドのdoc内にある、existenceと同じ挙動になるコードの例で使用しているメソッドが誤っていたのを修正しています。


Merge pull request #43718 from esparta/fix_race_conditions_test_cache_v

activesupport/test/cache/behaviors/local_cache_behavior.rbactivesupport/test/cache/stores/mem_cache_store_test.rbの修正です。

Active Supportのcacheのテストで、異なるテストで同じkeyを使っていたのを、keyにランダムな値を使用するようにして、並列に実行してもfailしないよう修正しています。


Rename connection_klass to connection_class

Active Recordの修正です。

ConnectionPoolconnection_klass attributeをconnection_classにリネームしています。2つの単語を使用している変数の場合、klassを使用する必要は無いだろう、という理由で修正されています。


:scissors:

activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rbのdocの修正です。

remove_columnメソッドのdoc内の不要なスペースを削除しています。


Use assert_equal

activemodel/test/cases/errors_test.rbの修正です。

assert + eql?を使用していた箇所を、assert_equalを使用するよう修正しています。


Mention yarn linking in contributing guide to run local npm packages

rails guideのContributing to Ruby on Railsの修正です。

Running an Application Against Your Local Branchの項に、ローカルにあるnpm packageをアプリケーションで使用する方法(yarn linkを使用)についての説明を追加しています。


Fix type in Pathname#existence documentation

activesupport/lib/active_support/core_ext/pathname/existence.rbのdocの修正です。

Pathname#existenceメソッドのdoc内のタイポを修正しています。


Typo in Active Storage: custom_metadatata -> custom_metadata

activestorage/app/models/active_storage/blob.rbの修正です。

custom_metadatacustom_metadatataにタイポしていたのを修正しています。


More docs about Zeitwerk compliance

rails guideのClassic to Zeitwerk HOWTOの修正です。

Does my Application Comply with Zeitwerk Conventions?の項に、より詳細なZeitwerkの挙動のルールについての説明を追加しいています。


More docs on having app in the autoload paths

rails guideのClassic to Zeitwerk HOWTOの修正です。

autoload / eager loadの対象にしたい無いディレクトリがある場合の設定方法についての説明を追加しています。