なるようになるブログ

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

rails commit log流し読み(2021/05/11)

2021/05/11分のコミットです。

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

activerecord/CHANGELOG.md


Raise a meaningful error if ActiveStorage::Current.host is blank

activestorage/lib/active_storage/service/disk_service.rbの修正です。

ActiveStorage::Current.hostが空の場合に、hostが空でエラーになっている事がわかるエラーを表示するよう修正しています。


allow ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting to match schema namespaced table columns

activerecord/lib/active_record/connection_adapters/postgresql/quoting.rbの修正です。

PostgreSQL adapterのquote処理で、schema名を考慮して処理を行うよう修正しています。ことなるschemaで同じテーブル名があった場合にエラーにならないようにする為。


Routing guide grammar fixes

rails guideのRails Routing from the Outside Inの修正です。各箇所のグラマーの修正を行っています。


Merge pull request #42190 from Shopify/active-record-sum-init

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

ActiveReocrd::Relation#sumメソッドにinitパラメータを指定出来るよう修正しています。Relation#sum経由でEnumerable#sumを呼び出す場合に、initパラメータを指定しないとエラーになるケースがある為。


Optimize normalize_name

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

LookupContext#normalize_nameメソッドについて性能改善のリファクタリングを行っています。


Avoid sending preload links for data: URLs

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

preload linkでdata: URLを送信しないよう修正しています。data:Linkheaderとしては不要なデータの為。


Log a warning when running SQLite in production

Active Recordの修正です。

SQLiteをproduction envで使用している場合にwarningメッセージを出力するよう修正しています。rails newした際のデフォルトがSQLiteになっている為、誤ってそのままSQLiteをproductionで使ってしまった場合に気付けるようにする為。


Revert "un-extract the Arel visitor for SelectOptions"

visit_Arel_Nodes_SelectOptionsメソッドを削除した、un-extract the Arel visitor for SelectOptionsをRevertしています。Rails内部では使用してなかったが、Oracle enhanced adapterが使用していた為。