diaspora/public/javascripts/models/post.js
2012-01-07 14:23:20 -08:00

11 lines
301 B
JavaScript

var Post = Backbone.Model.extend({
url: "/posts/:id",
intTime: function(){
return +new Date(this.get("created_at")) / 1000;
},
// should be moved into the view or something?
currentUserJSON: function(){
return $.parseJSON(unescape($("body").data("current-user-metadata")));
}
});