added code to posts.js.coffee