Refactor code, added image_url to _post.html.erb