refactor controller with set_post before_action