なるようになるブログ

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

rails commit log流し読み(2024/02/28)

2024/02/28分のコミットです。

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

railties/CHANGELOG.md

activerecord/CHANGELOG.md


Remove tools/profile

現在使用していないtools/profileを削除しています。


Set action_mailer.default_url_options values in development and test (#51191)

railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.ttrailties/lib/rails/generators/rails/app/templates/config/environments/test.rb.ttの修正です。

rails newで新規にアプリケーションを作成した場合に、developmenttest用のenvファイルにconfig.action_mailer.default_url_optionsの設定を記載するよう修正しています。mailerでurlを指定したpath helperを使用した場合にエラーにならないようにする為。


Merge pull request #51206 from fatkodima/fix-indexes-for-nonexisting-table

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

MySQL adapterで存在しないテーブル名をindexesメソッドに指定した場合に、ActiveRecord::StatementInvalidをraiseしていたのを空のArrayを返すよう修正しています。他のadapterと同じ挙動にする為。


[Fix #51164] Model.query_constraints with single non-primary-key column raises incorrect error

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

query_constraintsにprimary keyでないattributeを1つだけ指定した場合のエラーメッセージが誤った内容になっていた(query_constraintsに3つ以上のattributeが指定されている、というエラーになっていた)のを適切なエラーメッセージが表示されるよう修正しています。


Add Solid Queue to the list of backends in Active Job guide (#51212)

rails guideのActive Job Basicsの修正です。

Active Jobで使用出来るbackendの一覧にsolid_queueを追加しています。