pg_search

https://github.com/casecommons/pg_search

Ruby

pg_search builds ActiveRecord named scopes that take advantage of PostgreSQL’s full text search

Banzai::Filter::AbstractReferenceFilter#object_link_filter

Replace references (like `!123` for merge requests) in text with links
to the referenced object's details page.

text - String text to replace references in.
pattern - Reference pattern to match against.
link_content - Original content of the link being replaced.

Returns a String with references replaced with links. All links
have `gfm` and `gfm-OBJECT_NAME` class names attached for styling.

Source | Google | Stack overflow

Edit

git clone [email protected]:casecommons/pg_search.git

cd pg_search

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Banzai--Filter--AbstractReferenceFilter-object_link_filter-for-pr


# Commit to git

git add git commit -m "better docs for Banzai::Filter::AbstractReferenceFilter#object_link_filter"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Banzai--Filter--AbstractReferenceFilter-object_link_filter-for-pr

hub pull-request


# Celebrate!