{{view "select"
content=model
optionValuePath="content.id"
optionLabelPath="content.name" selection=category class="form-control"}}
publishPost: function() {
var newPost = this.store.createRecord('post', {
title: this.get('title'),
body: this.get('body'),
url_pic: this.get('url_pic'),
publish: new Date()
});
var _this = this;
newPost.save().then(function(newPost) {
_this.get('category.posts').pushObject(newPost);
}, function() {
newPost.rollback();
});
}