Update app/controllers/posts_controller.rb

code review