2025/03/05分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activemodel/CHANGELOG.md
rails guideのWorking with JavaScript in Railsの修正です。
Turbo Streamsセクション内のグラマーの修正を行っています。
rails guideのWorking with JavaScript in Railsの修正です。
Ajax Requestsセクションのグラマーの修正を行っています。
Fix channel generator import statement:
actioncable/lib/rails/generators/channel/channel_generator.rbの修正です。
importmapを使用している場合に、Action Channelのgeneratorがimport出来ないJSのコードを生成するバグがあったのを修正しています。
RuboCop: target the current Ruby version rather than old 2.7 (#54692)
railtiesの修正です。
rails newで新規にアプリケーションを生成した際に、rubocop.ymlにTargetRubyVersionを指定するよう修正しています。が、Rubocopは.ruby-versionからRubyのバージョンを取得するようになっており、TargetRubyVersionを明示的に指定する必要はなかった為、後ほどRevertされています。
Revert "RuboCop: target the current Ruby version rather than old 2.7 (#54692)"
直前のrubocop.ymlに関する修正をRevertしています。
Stop generating bundler binstub:
railtiesの修正です。
rails newに新規にアプリケーションを生成した際に、bin/bundleを生成しないよう修正しています。Bundlerのbinstubsコマンドを使用してbin/bundleを生成していたのですが、BundlerがBunlderの為のbinstubを生成しないようになった為。
参考:Stop generating binstubs for Bundler itself
Merge pull request #54682 from claudiob/form_docs
actionview/lib/action_view/helpers/form_options_helper.rbのdocの修正です。
FormOptionsHelperのdoc内のメソッド名がAPI docへのリンクになるよう修正しています。
Fix capture view helper to pass keyword arguments
actionview/lib/action_view/helpers/capture_helper.rbの修正です。
captureメソッドに指定したキーワード引数を、captureメソッドに指定したblockの引数として指定出来るよう修正しています。
Merge pull request #54685 from Earlopain/optimize-parameterize
activesupport/lib/active_support/inflector/transliterate.rbの修正です。
String#parameterizeメソッドについて、不要な場合はregexpによる処理を行わないよう改善しています。
Add except_on: option for validation callbacks
activemodel/lib/active_model/validations/callbacks.rbの修正です。
validationメソッドと同様に、validationのcallbacks(before_validation、after_validation)にも、特定のcontextの場合に実行をスキップする:except_onオプションを指定出来るよう修正しています。
Merge pull request #54675 from skipkayhil/hm-lazy-visualizer
actionpack/lib/action_dispatch/journey/router.rb、
actionpack/lib/action_dispatch/journey/routes.rbの修正です。
lazy routesが有効になっている場合に、routerのfsm visualizerが正しく生成されないバグがあったのを修正しています。
Move test helpers into test_helpers (#54688)
railties/lib/rails/generators/rails/authentication/authentication_generator.rbの修正です。
authentication generatorが生成するテスト用のhelperファイルの名前をhelpersからtest_helpersに修正しています。
Allow per-database schema format in database config
Active Recordの修正です。
schema_formatをdatabaseのconfigファイルに指定出来るよう修正しています。複数DBの設定をしていて、DB毎に異なるformatを指定した時の為、との事です。
primary: schema_format: ruby
[ci skip]Fix the incorrect version where allow_browser was added in the guide
rails guideのAction Controller Advanced Topicsの修正です。
allow_browserメソッドが追加されたRailsのバージョンの説明が誤っていたのを修正しています。