mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-02 07:43:11 +03:00
dfd4afea19
no issue - added https://github.com/TryGhost/bookshelf-relations as dependency - remove existing tag handling --- * Important: Ensure we trigger parent initialize function - otherwise the plugin is unable to listen on model events - important: event order for listeners is Ghost -> Plugin - Ghost should be able to listen on the events as first instance - e.g. be able to modify/validate relationships * Fix tag validation - we detect lower/update case slugs for tags manually - this can't be taken over from the plugin obviously - ensure we update the target model e.g. this.set('tags', ...) * override base fn: `permittedAttributes` - ensure we call the base - put relations on top - each relation is allowed to be passed - the plugin will auto-unset any relations to it does not reach the database * Ensure we run add/edit/delete within a transaction - updating nested relationships requires sql queries - all sql statements have to run in a single transaction to ensure we rollback everything if an error occurs - use es6 |
||
---|---|---|
.. | ||
adapters | ||
admin | ||
api | ||
apps | ||
auth | ||
config | ||
controllers | ||
data | ||
events | ||
helpers | ||
middleware | ||
models | ||
permissions | ||
public | ||
services | ||
settings | ||
site | ||
themes | ||
translations | ||
utils | ||
views | ||
analytics-events.js | ||
app.js | ||
errors.js | ||
filters.js | ||
ghost-server.js | ||
i18n.js | ||
index.js | ||
logging.js | ||
overrides.js | ||
update-check.js |