Ghost/core/client/models/base.js
Harry Wolff 81eb705a37 Create SettingsUserController
addresses #2422

- creates settings user controller

- creates user model object

- updates user fixture to be compatible with user model

- updates settings/user template

- add validator to Ember Admin

- use validator to validate user model is valid

- add mock response to /users/me/ path

- creates models/base file for all models to inherit from

- add mock response to /ghost/changepw/ path
2014-03-23 22:51:43 -04:00

18 lines
366 B
JavaScript

function ghostPaths() {
var path = window.location.pathname,
subdir = path.substr(0, path.search('/ghost/'));
return {
subdir: subdir,
apiRoot: subdir + '/ghost/api/v0.1'
};
}
var BaseModel = Ember.Object.extend({
});
BaseModel.apiRoot = ghostPaths().apiRoot;
BaseModel.subdir = ghostPaths().subdir;
export default BaseModel;