なるようになるブログ

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

rails commit log流し読み(2020/10/07)

2020/10/07分のコミットです。

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

actionpack/CHANGELOG.md


Link API documentation more in Form Helpers guide [ci-skip]

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

各メソッドからAPI docにリンクを貼るよう修正しています。


Do not add newlines when annotating rendered views

actionview/lib/action_view/template.rbactionview/lib/action_view/template/handlers/erb.rbの修正です。

rendered viewsのannotating処理でBEGIN / ENDコメントの後に改行を入れていたのを、入れないよう修正しています。

見やすくする為に改行を入れていたのですが、templateをrenderした結果をStringとして扱うような場合に邪魔になってしまう事がある為、改行は入れないよう修正しています。


Fix ActiveRecord::Relation#include? in case where offset is provided

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

loadされてないrelationに対してActiveRecord::Relation#include?を offset付きで実行した場合に、offsetが無視されてしまうバグがあったのを修正しています。


Add back missing LIMIT 1 in find_by SQL example [ci skip]

rails guideのActive Record Query Interfaceの修正です。

find_byで実行されるSQLのexampleが実際の内容と異なっていたのを修正しています。


Handle Relations with limit in include?

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

loadされてないrelationに対してActiveRecord::Relation#include?を limit付きで実行した場合に、limitが無視されてしまうバグがあったのを修正しています。


Revert "Merge pull request #39304 from zenspider/zenspider/backtrace_filter_should_never_return_empty"

BacktraceCleanerが空のbacktraceを返さないよう修正した、Fixed BacktraceCleaner to never return an empty backtrace.をRevertしています。

Railsのbacktrace cleanerは空のbacktraceを返せるようにする必要がある(アプリケーションコードとフレームワークコードを分ける為)為。


Decorate Rails' backtrace cleaner before passing to minitest

railties/lib/minitest/rails_plugin.rbの修正です。

minitestにbacktrace cleanerを渡す際に、空のbacktraceを返せるよう処理を定義したdecoratorでラップしたbacktrace clearを渡すよう修正しています。


Document new Record Active Support hooks

rails guideのGetting Started with Enginesの修正です。

Extract ActiveStorage::RecordExtract ActionText::RecordExtract ActionMailbox::Recordで追加されたhook(action_mailbox_recordaction_text_recordactive_storage_record)をhookの一覧に追加しています。


attr_reader methods are public methods

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

public methodsを呼び出すのにsendを使用していたのを、public_sendを使用するよう修正しています。


Get rid of unnecessary meta programming

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

middlewareのメソッドを呼び出す処理から不要なメタプロを削除しています。


This kind of wrapper should better not be able to call private methods railties/lib/rails/engine/updater.rbの修正です。

public methodsを呼び出すのにsendを使用していたのを、public_sendを使用するよう修正しています。


Both update_config_files and update_bin_files are public methods

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

publicメソッドを呼び出すのにsendを使用していたのを、直接メソッドを呼び出すよう修正しています。


If it respond_to a method, the method should be public_sendable

railties/lib/rails/generators/app_base.rbの修正です。

public methodsを呼び出すのにsendを使用していたのを、public_sendを使用するよう修正しています。


allow for only no-store in cache-control header

actionpack/lib/action_dispatch/http/cache.rbの修正です。

Cache-Control headerにno-storeだけを指定出来る(privateの指定も無し)よう修正しています。


Given method here (e.g. perform) should be public_sendable

activejob/test/support/queue_classic/inline.rbの修正です。

public methodsを呼び出すのにsendを使用していたのを、public_sendを使用するよう修正しています。


URL helper methods are public methods

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

public methodsを呼び出すのにsendを使用していたのを、public_sendを使用するよう修正しています。