pg_search

https://github.com/casecommons/pg_search

Ruby

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

Project#validate_board_limit

Similar to the normal callbacks that hook into the life cycle of an
Active Record object, you can also define callbacks that get triggered
when you add an object to an association collection. If any of these
callbacks throw an exception, the object will not be added to the
collection. Before you add a new board to the boards collection if you
already have 1, 2, or n it will fail, but it if you have 0 that is lower
than the number of permitted boards per project it won't fail.

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-Project-validate_board_limit-for-pr


# Commit to git

git add git commit -m "better docs for Project#validate_board_limit"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-Project-validate_board_limit-for-pr

hub pull-request


# Celebrate!