docs/services.md in lhs-2.0.3 vs docs/services.md in lhs-2.0.4
- old
+ new
@@ -181,10 +181,23 @@
# a feedback has a campaign, which has an entry
feedbacks = Feedback.includes(campaign: :entry).where(has_reviews: true)
feedbacks.first.campaign.entry.name # 'Casa Ferlin'
```
+### Multiple `includes`
+
+```ruby
+ # list of includes
+ claims = Claims.includes(:localch_account, :entry).where(place_id: 'huU90mB_6vAfUdVz_uDoyA')
+
+ # array of includes
+ claims = Claims.includes([:localch_account, :entry]).where(place_id: 'huU90mB_6vAfUdVz_uDoyA')
+
+ # Two-level with array of includes
+ feedbacks = Feedback.includes(campaign: [:entry, :user]).where(has_reviews: true)
+```
+
### Known services are used to request linked resources
When including linked resources with `includes`, known/defined services and endpoints are used to make those requests.
That also means that options for endpoints of linked resources are applied when requesting those in addition.
This enables you to include protected resources (e.g. OAuth) as endpoint options for oauth authentication get applied.
@@ -242,6 +255,6 @@
favorite.place.name # local.ch AG
```
## Validation
-See: [Item Validation](../item.md).
\ No newline at end of file
+See: [Item Validation](../item.md).