Added before_action to PostsController