Skip to content

Instantly share code, notes, and snippets.

@ianks
Created May 24, 2021 04:37
Show Gist options
  • Save ianks/208186980f88a8ffa73206b6cff8a597 to your computer and use it in GitHub Desktop.
Save ianks/208186980f88a8ffa73206b6cff8a597 to your computer and use it in GitHub Desktop.
yield it back
class BlogPostCreator
def create_post
if similar_post_already_created?
yield_to_user("This looks like a duplicate, sure you want to post this?") || halt
end
# do the things...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment