use before_action in post controller