2020/05/27分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Merge pull request #39437 from vinistock/remove_dup_from_set_content_type
actionpack/lib/action_dispatch/http/response.rb
の修正です。
Request#set_cotent_type
メソッドで指定されたcontent typeをdup
していたのを、String#+@
を使用してfreeze済みの場合のみ複製を使用するよう修正しています
Remove dup from post body for forcing encoding (#39438)
actionpack/lib/action_dispatch/http/request.rb
の修正です。
Request#body
メソッドでraw_post
をdup
していたのを、String#+@
を使用してfreeze済みの場合のみ複製を使用するよう修正しています
Fix "warning: instance variable @klass not initialized"
activerecord/lib/active_record/signed_id.rb
の修正です。
Rubyのwarning(warning: instance variable @Klass not initialized
)が出ていたのを対応しています。
Prefer string interpolation over direct mutation
actionpack/lib/action_dispatch/http/response.rb
の修正です。
Request#set_cotent_type
メソッドでstring interpolationを使用して、そもそもそ指定されたcontent typeの状態は変更しないよう修正しています。
No need to extend ActionController::Caching by ActiveSupport::Autoload
actionpack/lib/action_controller/caching.rb
の修正です。
使用していないActiveSupport::Autoload
を削除しています。
A few action_controller docs corrections
actionpack/lib/action_controller/metal/implicit_render.rb
、
actionpack/lib/action_controller/metal/strong_parameters.rb
のdocの修正です。
エラークラス名、及び、config名をタイポしていたのを修正しています。
Merge pull request #39060 from alipman88/fix_cache_fragment_digests
Action Viewの修正です。
cache fragment keyを生成する際に、関連するtemplateを全て含むよう修正しています。
<!-- views/pages/home.html.erb --> <%= render layout: "wrapper" do %> <%= cache @post %> <!-- cache fragment name: ["pages/_wrapper:3f4bbb56698f60f9616533df83be7694", #<Post id: 1, …>] --> HOME <%= end %> <%= end %>
<!-- views/pages/about.html.erb --> <%= render layout: "wrapper" do %> <%= cache @post %> <!-- cache fragment name: ["pages/_wrapper:3f4bbb56698f60f9616533df83be7694", #<Post id: 1, …>] --> ABOUT <%= end %> <%= end %>
上記のように、違う親テンプレート内で同じcache fragment keyが生成されてしまうのを避ける為。
Fix flaky assert queries tests
Active Recordのテストの修正です。
assert_no_queries
を使用していた箇所をassert_queries(0)
に修正しています。
schema loadのqueryが実行された事によりテストがコケてしまう事があり、それを避けるため。
rewhere
allow to overwrite non-attribute nodes
activerecord/lib/active_record/relation/query_methods.rb
、
activerecord/lib/active_record/relation/where_clause.rb
の修正です。
rewhere
でnon-attribute nodeを上書き出来るよう対応しています
Merge pull request #39361 from jhawthorn/path_parser
Action Viewの修正です。
templateのresolve処理を、prefix, partial, variant, locale, format, variant, と handlerから行うResolver::PathParser
クラスを追加しています。
元々上記パラメータを元にresolve処理は行われていたのですが、handlersやformatsが未指定の場合の挙動が怪しかったりしており、より正確にresolve処理が行われるようになっています。