Updated mobx to 3.2.2
Made this.observables.collection regular array, not an observable
Add common RESTful actions to BaseModel
Library no more build as single JS bundle.
Now it builds as several CommonJS files in /lib/
directory.
All external dependencies located in node_modules
.
It solve problem with huge dist size.
Add usage modelName
property first instead name
- Add toJSON() method to BaseModel
- Fix broken
hasOne
andhasMany
relations tests
- fix issue default superagent is set incorrectly
- cleanup
extraneous
modules - add .idea directory in to git ignore file
Passing superagent as config option.
Added onInitialize hook for model instances
Fixed a bug in setRealation method
Updated dependencies to latest versions
- file uploads now working, you can supply fileData option like this:
fileData: { attibuteName: 'file', file }
, where attributeName is name of form field that server expects and file is the file object. Note that to data fromdata
option won't be sent, as well as norequestData
fromAPI.config
- fixed issue with non-updating attributes on subsequent set instace method calls
- requestData and requestHeaders in api config can be an object or a function returning object
- Allow ids to be non-integer
- API onSuccess and onError callbacks are executed with full response object, not just json (which is now response.body)
- fixed BaseModel.get bug with mobx 2.0.5
- added requestHeaders to api config
- added onError callback to API
- onSuccess and onError now return only json, no requestId elsewhere
- we resolve API promise with whole response object from superagent now
- BaseModel.set static method now works if only { modelJson } was passed
- attributes in JSON can be either camelcased or underscored
- fixed static urlRoot and jsonKey properties for