Extracting displaying posts code into _post.html.erb partial.