update posts_controller.rb