2020/09/01分のコミットです。
CHANGELOGへの追加はありませんでした。
Proxying: sanitize Content-Type and Content-Disposition
Active Storageの修正です。
Active Storageのproxy処理で、Content-TypeとContent-Dispositionをsanitizeするよう修正しています。不正なコンテンツが指定された場合にXSSが実行されるのを防ぐ為。
Change belongs_to example to has_one [ci skip]
rails guideのActive Record Validations
の修正です。
presence
オプションについて説明している箇所のexampleにbelongs_to
を使用していたのを、has_one
を使用するよう修正しています。belongs_to
はデフォルトでpresence
が指定されている為。
Move TruffleRuby check to select the autoloading mode to 6.1 defaults
railties/lib/rails/application/configuration.rb
の修正です。
TruffleRubyでもデフォルトでZeitwerkを使用するようにする処理が、バージョンが6.0
の場合のデフォルトに指定されていたのを、6.1
の場合に指定するよう修正しています。
Use self[]
instead of build
directly in predicate builder
activerecord/lib/active_record/relation/predicate_builder.rb
の修正です。
presence builderでbuild
を直接使用せず、self[]
を使用するよう修正しています。3rd partyのcodeで処理を記述しやすくする為。
Translate Mysql2 errors in Mysql2Adapter#quote_string
activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
の修正です。
Mysql2Adapter#quote_string
メソッドでエラーになった場合に、Mysql2のエラーをそのままraiseしていたのを、ActiveRecord::StatementInvalid
でエラーをwrapするよう修正しています。
Merge pull request #40151 from kamipo/return_time_after_save
activerecord/lib/active_record/type/time.rb
の修正です。
changes_applied
の後にtime attributeの値がdecoratedされた値(ActiveRecord::Type::Time::Value
)になってしまっていたのを、元のtimeの値を返すよう修正しています。
Raise ConnectionNotEstablished rather than StatementInvalid in Mysql2Adapter#quote_string
Active Recordの修正です。
各種メソッドで、connectionが接続されておらずエラーになった場合にもActiveRecord::StatementInvalid
をraiseしていたのを、ActiveRecord::ConnectionNotEstablished
をraiseするよう修正しています。
Add CHANGELOG entry for #40106 [ci skip]
activerecord/CHANGELOG.md
の修正です。
where
で指定するtable名にassociation nameを指定出来るよう対応した、Allow where
references association names as joined table alias namesの対応についてCHANGELOGにエントリーを追加しています。