Ghost/core/server
kirrg001 355ef54702 Removed isNew usages in model layer
no issue

- `isNew` does not work in Ghost, because Ghost does not use auto increment id's
- see https://github.com/bookshelf/bookshelf/issues/1265
- see https://github.com/bookshelf/bookshelf/blob/0.10.3/src/base/model.js#L211
- we only had one occurance, which was anyway redundant
  - if you add a user, `hasChanged('password') is true
  - if you edit a user and the password has changed, `hasChanged('password')` is true as well

NOTE #1:

1. We can't override `isNew` and throw an error, because bookshelf makes use of `isNew` as well, but it's a fallback if `options.method` is not set.
2. It's hard to re-implement `isNew` based on `options.method`, because then we need to ensure that this value is always set (requires a couple of changes)

NOTE #2:
If we need to differentiate if a model is new or edited, we should manually check for `options.method === insert`.

NOTE #3:
The unit tests are much faster compared to the model integration tests.
I did a comparision with the same test assertion:
  - unit test takes 70ms
  - integration test takes 190ms
2018-02-15 22:11:49 +01:00
..
adapters
api Sorted out the mixed usages of include and withRelated (#9425) 2018-02-15 10:53:53 +01:00
apps Moved make-absolute-urls to url service 2017-12-14 22:34:37 +01:00
config Update Notification improvements (#9123) 2018-01-09 15:20:00 +01:00
controllers
data 🐛 Fixed migrating from < 1.13 to 1.21 2018-02-07 12:31:21 +01:00
helpers 🐛Fixed {{get}} helper's date comparison (#9454) 2018-02-14 18:33:07 +01:00
lib Added lib.security.password lib 2018-02-15 21:13:04 +01:00
models Removed isNew usages in model layer 2018-02-15 22:11:49 +01:00
public
services Sorted out the mixed usages of include and withRelated (#9425) 2018-02-15 10:53:53 +01:00
translations Removed html usage in error messages (#9444) 2018-02-07 09:35:48 +01:00
views Fixed error trying to render 404 for missing asset 2017-12-22 20:08:59 +00:00
web 🐛Fixed asset redirects (#9455) 2018-02-14 17:21:31 +01:00
analytics-events.js
filters.js
ghost-server.js
index.js Theme translations and blog localisation (#8437) 2018-01-09 14:50:57 +01:00
overrides.js
update-check.js Update Notification improvements (#9123) 2018-01-09 15:20:00 +01:00