maybe make this into a render partial like you did for the posts?