0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/server/services/mega
Simon Backx a30e42404b
Added getLazyRelation model helper method (#14943)
closes https://github.com/TryGhost/Team/issues/1626

- getLazyRelation is a safer shorthand for `model.related('relationName').fetch()`
- prevents doing a `fetch` operation on a relation that is already loaded, which can cause issues when `formatOnWrite` has a custom implementation
- uses the already loaded relation if it exists, or loads the relation
- doesn't reload if already loaded
- reload is forceable using the forceRefresh option
2022-05-31 13:21:53 +02:00
..
email-preview.js Added getLazyRelation model helper method (#14943) 2022-05-31 13:21:53 +02:00
index.js
mega.js Added getLazyRelation model helper method (#14943) 2022-05-31 13:21:53 +02:00
post-email-serializer.js Refactored html-to-plaintext to have two functions 2022-05-16 09:38:16 +01:00
segment-parser.js Lazy loaded cheerio dependency 2021-11-18 17:31:04 +01:00
template.js Updated emails to use newsletter settings (#14588) 2022-04-27 18:48:36 +01:00