なるようになるブログ

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

rails commit log流し読み(2020/11/26)

2020/11/26分のコミットです。

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

activerecord/CHANGELOG.md


Improve docs about autoloading and boot time [skip ci]

rails guideのAutoloading and Reloading Constants (Zeitwerk Mode)の修正です。

Autoloading when the application bootsの項に、reloadが不要なファイルの置き場についての説明、及び、そのファイルをconfig/application.rbでロードする方法についての説明を追加しています。


AC::Testing uses no AS::Concern feature since 879d540adc34603f0fd1ac1a44763598e9ccc551

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

使用していないActiveSupport::Concernのextendを削除しています。


AC::Streaming uses no AS::Concern feature since 7da88c5b297486cd90696133d287be7d60d65218

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

使用していないActiveSupport::Concernのextendを削除しています。


AV::Helpers::TagHelper uses no AS::Concern feature

actionview/lib/action_view/helpers/tag_helper.rbの修正です。

使用していないActiveSupport::Concernのextendを削除しています。


AR::QueryMethods uses no AS::Concern feature since 8d9545389f6a53dcd1ebae28c8b966c296da95f2

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

使用していないActiveSupport::Concernのextendを削除しています。


doc fix: Just referencing an association does not indeed load the records

activerecord/lib/active_record/associations/collection_proxy.rbのdocの修正です。

loaded?メソッドのdoc内にあるexampleコードが期待通り動作しないコードになっていたのを修正しています。


Only use ActionDispatch::ActionableExceptions middleware if local env

railties/lib/rails/application/default_middleware_stack.rbの修正です。

config.consider_all_requests_localがtrueの場合のみActionDispatch::ActionableExceptions middlewareを使用するよう修正しています。


Use application time zone when gets time as String.

activesupport/lib/active_support/testing/time_helpers.rbの修正です。

travel_toにStringの値が指定された場合に、applicationで指定しているtime zoneの値を使用してパースするよう修正しています。


ActionView::Helpers::AssetTagHelper uses no AS::Concern feature

actionview/lib/action_view/helpers/asset_tag_helper.rbの修正です。

使用していないActiveSupport::Concernのextendを削除しています。


ActionDispatch::Assertions uses no AS::Concern feature since ddc584e89eaf6845f8cd72bcafce5035c9893dbb

actionpack/lib/action_dispatch/testing/assertions.rbの修正です。

使用していないActiveSupport::Concernのextendを削除しています。


Simply require rather than autoload + immediately load

actionpack/lib/action_dispatch/testing/assertions.rbの修正です。

module load時にクラスをautoloadしていたのを、requireを使用するよう修正しています。


Merge pull request #40696 from rails/where-associated

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

associationが存在しているレコードをを取得する為のassociatedメソッドを追加しています。

# Before:
account.users.joins(:contact).where.not(contact_id: nil)

# After:
account.users.where.associated(:contact)

missingの逆の挙動を行うメソッド。


These helpers do not use anything in tag_helper.rb

Action Viewの修正です。

使用していないrequireを削除しています。


UrlHelper does not depend on anything from javascript_helper.rb

actionview/lib/action_view/helpers/url_helper.rbの修正です。

使用していないrequireを削除しています。


FormOptionsHelper does not depend on FormHelper

actionview/lib/action_view/helpers/form_options_helper.rbの修正です。

使用していないrequireを削除しています。


Missing requires

Action Viewの修正です。

不足していたrequireを追加しています。


Simply require rather than autoload + immediately load below

actionview/lib/action_view/helpers.rbの修正です。

module load時にクラスをautoloadしていたのを、requireを使用するよう修正しています。