framework/ember/app/models/post-result.js

21 lines
347 B
JavaScript
Raw Normal View History

2014-12-20 14:26:46 +08:00
import Ember from 'ember';
var PostResult = Ember.ObjectProxy.extend({
relevantContent: ''
});
PostResult.reopenClass({
create: function(post) {
if (!post) return null;
var result = this._super();
result.set('content', post);
result.set('relevantContent', post.get('content'));
return result;
}
});
export default PostResult;