mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 04:13:30 +03:00
a9a69fa441
issue #2270 - from https://github.com/manuelmitasch/ghost-admin-ember-demo - Not working properly: added ic-ajax mock in app.js but promise not resolving => loading route always active
11 lines
351 B
JavaScript
11 lines
351 B
JavaScript
export default Ember.Route.extend({
|
|
model: function (params) {
|
|
var posts = this.modelFor('posts').posts,
|
|
id = parseInt(params.post_id);
|
|
|
|
return posts.findBy('id', id);
|
|
|
|
// model already loaded in parent route => no ajax call to server
|
|
// return ajax("/ghost/api/v0.1/posts/" + params.post_id);
|
|
}
|
|
}); |