2020/11/10分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Allow constructors (
build_association
andcreate_association
) onhas_one :through
associations. - Build predicate conditions with objects that delegate
#id
and primary key
Clean up preventing writes tests
Active Recordのテストの修正です。
preventing writeのテストから、不要なtransactionやassert_deprecated
等の呼び出し等を削除しています。
Allow constructors for has_one :through
activerecord/lib/active_record/reflection.rb
の修正です。
has_one :through
associationの構築が出来るよう修正しています。
Merge pull request #40570 from tahsin352/th_remove_jquery_metadata
使用していないjQuery metadataを削除しています。
Merge pull request #40008 from santib/upgrading-to-image-processing
rails guideのUpgrading Ruby on Rails
の修正です。
Upgrading from Rails 6.0 to Rails 6.1
の項に、Active Storageを利用するにはImage Processingが必要になっている旨説明した、Active Storage now requires Image Processing
を追加しています。
Always show version badge, not just for edge [ci skip]
rails guideの修正です。
rails guideで、edge以外の場合もバージョンバッジを表示するよう修正しています。
Support delegators in query Predicate building
activerecord/lib/active_record/relation/predicate_builder.rb
、
activerecord/lib/active_record/relation/predicate_builder/association_query_value.rb
の修正です。
predicate conditionsを構築する際に、値がActiveRecord::Base
を継承したインスタンスかどうかでチェックしていたのを、respond_to?
でidを取得出来るかどうかに修正しています。
predicate conditionsにdelegateしたオブジェクトを渡せるようにする為。
Don't require event to be passed to read_entry
activesupport/lib/active_support/cache/strategy/local_cache.rb
の修正です。
read_entry
メソッドで、intrumentation payload用のstoreを設定する際に、event
オプションが指定されている場合のみ設定するよう修正しています。event
オプションが指定されていないstoreが使用された場合に、エラーにならないようにする為。
Allow access to CurrentAttributes in test teardown
activesupport/lib/active_support/current_attributes/test_helper.rb
の修正です。
currentattributes
のリセット処理をbefore_teardown
で行っていたのを、after_teardown
で行うよう修正しています。テストで定義したteardown
でcurrentattributes`の値を参照出来るようにする為。
Gemfile.lock
の修正です。
sdocのバージョンを2.0.2に更新しています。
Update active storage s3 direct uploads docs
rails guideのActive Storage Overview
の修正です。
S3のCORS configurationのexampleが古いフォーマット(XML)だったのを、最新のフォーマット(JSON)に修正しています。
Add missing TLD to api links in AR queries guide [skip ci]
rails guideのActive Record Query Interface
の修正です。
API docへのリンクにTLDの指定が不足していたのを修正しています。
Display exception messages using simple_format for a better and clearer
actionpack/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
の修正です。
デフォルトのエラーページでExceptionを表示する際に、simple_format
メソッドを使用して見た目を調整するよう修正しています。
Document ActionController::Cookies#cookies [ci-skip]
actionpack/lib/action_controller/metal/cookies.rb
のdocの修正です。
ActionController::Cookies#cookies
メソッドにdocを追加しています。
Merge pull request #40577 from jonathanhefner/guide-layouts_and_rendering-link-api
rails guideのLayouts and Rendering in Rails
の修正です。
各メソッドについてAPI docにリンクするよう修正しています。
Append development routes after reload hook
railties/lib/rails/application/finisher.rb
の修正です。
root routeを独自に追加している場合に、Rails内部で使用しているroutesもそのroot route配下に定義されるよう修正しています。
[ci skip] Fix outdated class in multiple database docs.
rails guideのMultiple Databases with Active Record
の修正です。
connected_to
のrole
に存在しない値を指定した場合のエラーメッセージが、実際に出力される内容と異なっていたのを修正しています。
Allow subscribing with a single argument callable
activesupport/lib/active_support/notifications/fanout.rb
の修正です。
ActiveSupport::Notifications.subscribe
の引数にcallableオブジェクトを指定した場合に、下記のようにそのcallableオブジェクトで引数にEventObject
を受ける事が出来なかったのを修正しています。
listener = ->(event) do puts "Reacting to #{event.name}" end ActiveSupport::Notifications.subscribe('some_event', &listener)