add before block to post controller for common show, edit, update, destroy methods