なるようになるブログ

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

rails commit log流し読み(2020/03/13)

2020/03/13分のコミットです。

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

railties/CHANGELOG.md


Revert "Merge pull request #38710 from Madogiwa0124/remove_unecessary_require_from_active_support_time"

activesupport/lib/active_support/core_ext/integer/time.rbからactive_support/core_ext/numeric/timeのrequireを削除した、remove unnecessary require 'core_ext/numeric/time'.をRevertしています。

activesupport/lib/active_support/core_ext/integer/time.rbでは使ってなかったのですが、この対応によりactive_support/core_ext/numeric/timeで定義されているメソッドをアプリケーション側で使おうとすると、別途active_support/core_ext/numeric/timeをrequireしなくてはならなくなる、という問題が発生した為Revertされています。


Merge pull request #38701 from OsamaSayegh/mp-in-rails

railties/lib/rails/generators/rails/app/templates/Gemfileの修正です。

rails newで生成されるGemfilerack-mini-profilerを追加しています。

rack-mini-profiler側でRailsへのモンキーパッチが不要になるよう改善(ActiveSupport::Notificationsを使うようになった)がされ、デフォルトで使うようにしても良いのでは、という話になりで追加されたました。

参考: Allow Mini Profiler patches to be optional in Rails applications


Rails::Command.invoke wants kwargs, so give it kwargs

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

Rails::Command.invokeRuby 2.8で動作しない(キーワード引数の渡し方が誤っていた)ようになっていたのを修正しています。


Merge pull request #38676 from kwerle/correct_object_serializer_doc

activejob/lib/active_job/serializers/object_serializer.rbの修正です。

deserializeメソッドの引数名を適切な名前に修正しています。


Merge pull request #38689 from yashLadha/refactor/arel_fetch_attribute

activerecord/lib/arel.rbactiverecord/lib/arel/nodes/binary.rbの修正です。

attributeを検出する為の処理をArel::Nodes::Binaryクラスのメソッドに切り出しています。


Merge pull request #38595 from dylnclrk/update-params-in-docs

rails guideのAction Controller Overviewの修正です。

guide内のexampleコードでparamsの値を直接参照しているコードがあったのを、Strong Parameterを使用するよう修正しています。


Extract building ActiveRecord::Result into a method

Active Recordの修正です。

ActiveRecord::Resultの生成処理をメソッドに切り出してしています。


Fix variable not initialized warnings

activesupport/test/concern_test.rbの修正です。

インスタンス変数の初期化に関する警告(warning: instance variable)が出ていたのを修正しています。