なるようになるブログ

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

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

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

CHANGELOGへの追加はありませんでした。


Fix select with a hash not to treat raw strings as identifiers

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

selectにhashを指定した場合に、raw stringをidentifierとして扱っていたのを、identifierとして扱わないよう修正しています。select(posts: ["*"])のようにcolumnでない値が指定されるケースがあり、Rails 7.2まではそれが動作しており、同じ挙動をサポートする為。


Allow rescuing ActionController::Redirecting::UnsafeRedirectError in controllers

actionpack/lib/action_controller/metal/redirecting.rbの修正です。

ActionController::Redirecting::UnsafeRedirectErrorをrescueして独自時にrenderする場合に、responseのstatusが302で固定になってしまっていたのを、別途render等を行った場合は302にならないよう修正しています。


Fix rubocop offences

actionpack/test/controller/redirect_test.rbの修正です。

Rubocopのチェックでエラーになる箇所があったのを修正しています。


Don't generate the step for system tests when an application is API-only

railties/lib/rails/generators/rails/app/templates/github/ci.yml.ttの修正です。

アプリケーションがAPI onlyアプリケーションの場合に、不要なsystem test用のstepをCIで行わないよう修正しています。


Merge pull request #53530 from zzak/nodoc-generate_alias_attribute_methods

activemodel/lib/active_model/attribute_methods.rbactiverecord/lib/active_record/attribute_methods.rbのdocの修正です。

内部用APIAPI docに表示されないよう修正しています。