Commit 2f9f5847 by Jim
parent d10a7713
...@@ -124,6 +124,16 @@ def product ...@@ -124,6 +124,16 @@ def product
end end
``` ```
If you want to include associated soft-deleted objects, you can (un)scope the accociation:
``` ruby
class Person < ActiveRecord::Base
belongs_to :group, -> { with_deleted }
end
Person.includes(:group).all
```
If you want to find all records, even those which are deleted: If you want to find all records, even those which are deleted:
``` ruby ``` ruby
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment