var newPost = this.store.createRecord("post", {
title: this.get("title"),
text: this.get("text"),
intro: this.get("intro")
});
newPost.save();
this.transitionToRoute("admin.posts");
App.AdminPostsRoute = Ember.Route.extend({
model: function () {
return this.store.find("post");
}
});
var newPost = this.store.createRecord("post", {
title: this.get("title"),
text: this.get("text"),
intro: this.get("intro")
});
var _this = this;
newPost.save().then(function() {
_this.transitionToRoute("admin.posts");
});