1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add CHANGELOG entry for #40106 [ci skip]

This commit is contained in:
Ryuta Kamizono 2020-09-01 18:19:27 +09:00
parent af42091416
commit 7b9ca16394

View file

@ -1,3 +1,17 @@
* Allow `where` references association names as joined table name aliases.
```ruby
class Comment < ActiveRecord::Base
enum label: [:default, :child]
has_many :children, class_name: "Comment", foreign_key: :parent_id
end
# ... FROM comments LEFT OUTER JOIN comments children ON ... WHERE children.label = 1
Comment.includes(:children).where("children.label": "child")
```
*Ryuta Kamizono*
* Support storing demodulized class name for polymorphic type.
Before Rails 6.1, storing demodulized class name is supported only for STI type