2023/05/31分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
actioncable/CHANGELOG.md
Merge pull request #48293 from flavorjones/flavorjones-support-html5-sanitizer
Action Viewの修正です。
rails-html-sanitizer 1.6.0で追加されたHTML5の標準に準拠したsanitizerをAction Viewで使用出来るよう修正しています。デフォルトは古いsanitizer(Rails::HTML4::Sanitizer
)を使用するようになっており、config.action_view.sanitizer_vendor
にRails::HTML::Sanitizer.best_supported_vendor
を指定した場合、かつ、使用出来る場合は新しく追加されたsanitizer(Rails::HTML5::Sanitizer
)が使用されるようになっています。
Merge pull request #48323 from Eric-Guo/ci_fixture_vendor_no_loading
railties/lib/rails/engine.rb
の修正です。
自動でtest/fixtures
をRails engineのfixture_paths
に設定する際に、vendor
配下のtest/fixtures
は設定しないよう修正しています。
Merge pull request #48199 from JoeDupuis/remove-url-rewriter-tests
Action Packのテストの修正です。
大分昔に削除されたUrlRewriter
という機能に対するテストが残っていたのを削除しています。
Merge pull request #48222 from JoeDupuis/health-check-standalone-cable
Action Cableの修正です。
health check用のpath、及び、Rackアプリケーションをconfig(health_check_path
、health_check_application
)で指定出来るよう修正しています。Action Cableのserverをstandaloneで使用するような場合に、health checkの設定を出来るようにする為。
Preserve timestamp when setting an ActiveSupport::TimeWithZone
value to timestamptz
attribute
activerecord/lib/active_record/connection_adapters/postgresql/oid/timestamp_with_time_zone.rb
の修正です。
ActiveRecord::Base.time_zone_aware_types
に:timestamptz
を追加しているのに、timestamptz
を使用しているattributeでtimezoneが保持されないバグがあったのを修正しています。
Fix humanize
for strings ending with id
activesupport/lib/active_support/inflector/methods.rb
の修正です。
末尾がid
になっているStringに対してhumanize
を実行した場合に、id
部分が削除されてしまうバグがあったのを修正しています。
Merge pull request #43770 from terracatta/add_bind_params_to_url_helper
Action Packの修正です。
url helperのoptionに、query parameterを指定する為のpath_params
オプションを追加しています。 例えば、下記のようにroutes、及び、controllerでpath_params
オプションを指定した場合、
Rails.application.routes.draw do scope ":account_id" do get "dashboard" => "pages#dashboard", as: :dashboard get "search/:term" => "search#search", as: :search end delete "signout" => "sessions#destroy", as: :signout end
class ApplicationController < ActionController::Base def default_url_options { path_params: { account_id: "foo" } } end end
scopeで定義したaccount_id
のデフォルトとしてcontrollerで定義した値が使用されるようになり、下記のようなpathが生成されるようになっています。
dashboard_path # => /foo/dashboard dashboard_path(account_id: "bar") # => /bar/dashboard search_path("quin") # => /foo/search/quin signout_path # => /signout signout_path(account_id: "bar") # => /signout?account_id=bar signout_path(account_id: "bar", path_params: { account_id: "baz" }) # => /signout?account_id=bar