なるようになるブログ

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

rails commit log流し読み(2023/04/20)

2023/04/20分のコミットです。

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

activemodel/CHANGELOG.md


[Tests only] Add coverage for .count calculations for a CPK model

activerecord/test/cases/calculations_test.rbの修正です。

composite primary keyを設定しているmodelで#countメソッドが動作する事を確認するテストを追加しています。


Merge pull request #47944 from the-spectator/inspect_for_cache_store

activesupport/lib/active_support/cache/file_store.rbactivesupport/lib/active_support/cache/null_store.rbの修正です。

FileStore、及び、NullStore#inspectメソッドを追加しています。デフォルトの#inspectだと不要なappの情報などが出力されてしまうため。


Merge pull request #47977 from p8/guides/headings

rails guideの修正です。

guideのtitleにh1タグを使用するよう修正しています。


Add ActiveSupport::Cache::MemCacheStore#inspect

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

Merge pull request #47944 from the-spectator/inspect_for_cache_storeのfollow upとして、MemCacheStoreにも#inspectを定義し、MemCaceStoreとして必要な情報のみ表示されるよう修正しています。


Merge pull request #47708 from rails/fix-am-secure-password-length-validation

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

ActiveModel::SecurePasswordでpasswordのlengthをチェックする際に、byte数がBCryptの制限(72 byte)を越えた場合にvalidationでエラーになるよう修正しています。


Use h1 from header for guides title tag [ci-skip]

guides/rails_guides/markdown.rbの修正です。

ページのtitleを生成する際に、h2を使用していたのをh1を使用するよう修正しています。Use h1 for guide titlesのフォローアップ。


Fix headings in guides index [ci-skip]

guides/source/_welcome.html.erbguides/source/index.html.erbの修正です。

guide indexページのheadingにh1を使用するよう修正、及び、それ以降のセクション名にh2を使用するよう修正しています。


Modernizes some examples in the autoloading guide

rails guideのAutoloading and Reloading Constantsの修正です。

記載されている内容と現在のloaderの挙動が一致していない箇所があったのを修正しています。


Merge pull request #47996 from Shopify/pm/cpk-query-by-single-record

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

composite primary keyを使用しているmodelをassociationとして定義している場合に、whereのconditionとしてそのmodelを指定出来るよう修正しています。