Updated the index posts_controller and updated the view for posts index