redirect to post show page after post is created by injecting $location in posts controller