mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
55193e449a
For example: class Post < ActiveRecord::Base default_scope -> { where published: true } end class Comment belongs_to :post end When calling `Comment.join(:post)`, we expect to receive only comments on published posts, since that is the default scope for posts. Before this change, the default scope from `Post` was not applied, so we'd get comments on unpublished posts. |
||
---|---|---|
.. | ||
active_record | ||
rails/generators | ||
active_record.rb |