なるようになるブログ

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

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

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

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

actionpack/CHANGELOG.md

railties/CHANGELOG.md


Merge pull request #47877 from luanzeba/route-source-location

Action Packの修正です。

rails routes -Eなどrouteの一覧をextended viewで表示する際に、Source Locationも表示するよう修正しています。

--[ Route 14 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Prefix            | new_gist
Verb              | GET
URI               | /gist(.:format)
Controller#Action | gists/gists#new
Source Location   | config/routes/gist.rb:3
--[ Route 15 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Prefix            | new
Verb              | GET
URI               | /gist/new(.:format)
Controller#Action | gists/gists#new
Source Location   | config/routes/gist.rb:4

Rename :rails deprecator as :railties

railties/lib/rails/application.rbの修正です。

railtiesで使用するdeprecatorの名称を:railsから:railtiesに変更しています。


Linkify code references [ci-skip]

activesupport/lib/active_support/deprecation/reporting.rbのdocの修正です。

ActiveSupport::Deprecation::Reporting moduleの各メソッドのdoc内のmodule名等がAPI docへのリンクになるよう修正しています。


Simplify reference links [ci-skip]

activesupport/lib/active_support/deprecation/deprecators.rbのdocの修正です。

API docへのリンクを指定するのにqualified module nameが不要な所からはmodule名を削除しています。


Merge pull request #47801 from p8/railties/deprecate-all-secrets-commands

railties/lib/rails/commands/secrets/secrets_command.rbの修正です。

secrets:edit/showをdeprecatedに変更、及び、secrets:setupコマンドを削除しています。同等の機能を提供するcredentialsコマンドが別にあり、現在はそちらを使用するのが推奨されている為。


Ensure none constraint scopes don’t trigger a query

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

constraint scopeでnone associationが指定された場合に、不要なqueryが実行されないよう修正しています。


Merge pull request #47889 from aharpole/fix-foreign-key-infinite-recursion

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

has_one / has_many associationにinverse_ofオプションが指定されている場合にその対象から自動でforeign_keyを推測するよう対応した、Infer foreign_key when inverse_of is presentの影響で、foreign_keyの取得処理が無限ループしてしまう事があったのを修正しています。


Changelog entry for routes source location

actionpack/CHANGELOG.mdの修正です。

rails routes -Eなどrouteの一覧をextended viewで表示する際にSource Locationも表示するよう修正した対応について、CHANGELOGにエントリーを追加しています。