なるようになるブログ

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

rails commit log流し読み(2021/01/22)

2021/01/22分のコミットです。

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

activerecord/CHANGELOG.md


Remove trailing commas in advanced route constraints example

rails guideのRails Routing from the Outside Inの修正です。

Constraints in a block formの項にあるroutingのexampleコードから、不要な末尾のカンマを削除しています。


Merge pull request #41201 from jonathanhefner/bin-yarn-find-yarn-cmd-ps1

railties/lib/rails/generators/rails/app/templates/bin/yarn.ttの修正です。

rails newで生成するbin/yarnWindowsでも動作するよう修正しています。


Merge pull request #41200 from jonathanhefner/actiontext-installer-support-windows

actiontext/lib/generators/action_text/install/install_generator.rbの修正です。

Acction TextのinstallerがWindowsでも動作するよう修正しています。


Merge pull request #41181 from ayrton/activerecord-strict-loading-optout

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

strict_loading!メソッドに引数を指定出来るようにして、strict loadingをmodel毎に無効化出来るよう修正しています。

class User < ApplicationRecord
  has_many :articles, strict_loading: true
end

user = User.first
user.articles
# => ActiveRecord::StrictLoadingViolationError

user = User.first
user.stict_loading!(false)
user.articles
# => #<ActiveRecord::Associations::CollectionProxy>

Fix granular connection swapping when there are multiple abstract classes

activerecord/lib/active_record/connection_handling.rbactiverecord/lib/active_record/core.rbの修正です。

1つのmodelが複数のabstract classを親に持っている場合に、connected_toによるconnectionの切り替えが正しく行えないバグがあったのを修正しています。


Avoid testing Thor internals

railties/test/generators/shared_generator_tests.rbの修正です。

generatorのテストで、Thorの内部の挙動までもテストしてしまっている箇所があったのを修正しています。


Fix the benchmark script to point to the main branch

guides/bug_report_templates/benchmark.rbの修正です。

GitHubrails/railsリポジトリを指定する際に、mainブランチを使用するよう修正しています。


Resolve default annotation tags after config loads

railties/lib/rails/commands/notes/notes_command.rbの修正です。

Thorの挙動変更により、notes commandのannotationsのデフォルトの指定が動作しなくなっていたのを修正しています。


Upgrade all the gems to make sure we are testing with the latest versions locally

Gemfile.lockの修正です。

各種gemを最新のバージョンに更新しています。


Merge pull request #40392 from shioyama/remove_respond_to_unsafe_method

activesupport/lib/active_support/core_ext/string/output_safety.rbの修正です。

unsafe methodの定義処理から、不要なrespond_to?のチェックを削除しています。


Update name of input to fix typo

rails guideのAction View Form Helpersの修正です。

A Generic Search Formの項のタイポを修正しています。


connected_to shouldn't be called on the abstract class that not established connection

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

connectionを接続していないabstract classでconnected_toを使用した場合に、エラーになるよう修正しています。

connectionを接続していない場合、親abstract classのconnectionが使用されてしまうのですが、恐らくこれは想定していない動作の為。


Merge pull request #41161 from ghiculescu/patch-1

guides/source/documents.yamlの修正です。

Rails Guides listにWebpacker Guideが含まれるよう修正しています。