2020/07/06分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Remove references to WARNINGS environment variable [ci skip]
guides/Rakefile
、及び、rails guideのRuby on Rails Guides Guidelines
の修正です。
refactors and fixes in guides generation [ci skip]で削除されたWARNINGS
envを指定、及び、説明している箇所を削除しています。
Support where
with comparison operators (>
, >=
, <
, and <=
)
activerecord/lib/active_record/relation/predicate_builder.rb
の修正です。
where
にcomparison operators (>
, >=
, <
, と <=
)を指定出来るよう対応しています。
posts = Post.order(:id) posts.where("id >": 9).pluck(:id) # => [10, 11] posts.where("id >=": 9).pluck(:id) # => [9, 10, 11] posts.where("id <": 3).pluck(:id) # => [1, 2] posts.where("id <=": 3).pluck(:id) # => [1, 2, 3]
type castingとtable / column名の解決をより正確に出来る為、where("create_at >= ?", time)
よりも、新しく追加されたwhere("create_at >=": time)
を使用するのが推奨されるようになっています。
Consolidate stringify keys in PredicateBuilder
activerecord/lib/active_record/relation/predicate_builder.rb
、
activerecord/lib/active_record/relation/query_methods.rb
の修正です。
PredicateBuilder
でHashのkeyにStringを使用するよう統一しています。
Resolve attribute alias for counter cache column
activerecord/lib/active_record/associations/has_many_association.rb
、
activerecord/lib/active_record/reflection.rb
の修正です。
counter cacheのcolumnにalias attributeを指定出来るよう対応しています。
Change default HTTP status to 308 for ActionDispatch::SSL.
Action Pack、railtiesの修正です。
GET/HEAD以外のrequestをHTTPからHTTPSにリダイレクトした際のHTTP statusのデフォルトを308
に変更しています。RFC 7538に準ずる為。
参考: RFC 7538 - The Hypertext Transfer Protocol Status Code 308 (Permanent Redirect)