なるようになるブログ

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

rails commit log流し読み(2024/10/04)

2024/10/04分のコミットです。

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

activerecord/CHANGELOG.md

actionpack/CHANGELOG.md


Fix tests to pass on ruby-head

activemodel/test/cases/type/date_time_test.rbrailties/test/commands/routes_test.rbの修正です。

ruby-headでテストが通るようにする為、routeのsource locationの行数をチェックしたテストを修正(routeのsource locationはRubyのバージョンによって変わる可能性がある為)、Hash#inspectの結果をチェックしている箇所を修正(Hash#inspect with colon style で結果が変更になったため)しています。


Fix grammar typo in sentence.

rails guideのWorking with JavaScript in Railsの修正です。

Ajax Requestsセクション内のタイポを修正しています。


Bug report templates should use ActiveSupport::TestCase not raw Minitest::Test

bug report templatesの修正です。

templatesで使用するテストクラスをMinitest::TestからActiveSupport::TestCaseに変更しています。Railsが提供している独自のassertionメソッド等を使用出来るようにする為。


Fix remove_column API doc [ci-skip]

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

remove_columnメソッドのdoc内のif_existsオプションについて説明している箇所のタイポを修正しています。


Allow ActiveRecord::QueryMethods#pluck to accept hash args with symbol & string values

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

ActiveRecord::Base#pluckvalueがsymbolまたはstringのhashを指定出来るよう修正しています。

Post.joins(:comments).pluck(:id, comments: :id)
Post.joins(:comments).pluck("id", "comments" => "id")

[Fix #51463] Raise an error when invalid :on or :except options are given to #resource or #resources

actionpack/lib/action_dispatch/routing/mapper.rbの修正です。

routingの#resource及び#resourcesメソッドにサポートしていないオプションが指定された場合に、ArgumentErrorをraiseするよう修正しています。