Update posts_controller.rb

Controller for posts (CRUD-operations)