Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to only generate hashtags if a specific condition is met #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JustinAiken
Copy link

Some things are better left unsaid
Some strings are better left undone
Some hearts are better left unbroken
Some social media is better left unhashtagged

This PR adds the option to create a guard (either a lambda or a method) that's checked before creating hashtags - the example given in the README and specs is pretty basic, but in practice this works well for more advanced checks on relationships and permissions and such.

end

it "creates hashtags if the guard is fulfilled" do
GuardedPost.create(body: 'Community saved! #sixseasonsandamovie')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#sixseasonsandamovie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants