pg_search
https://github.com/casecommons/pg_search
Ruby
pg_search builds ActiveRecord named scopes that take advantage of PostgreSQL’s full text search
Gitlab::ImportExport::ProjectTreeRestorer#create_sub_relations
Given a relation hash containing one or more models and its relationships, loops through each model and each object from a model type and and assigns its correspondent attributes hash from +tree_hash+ Example: +relation_key+ issues, loops through the list of *issues* and for each individual issue, finds any subrelations such as notes, creates them and assign them back to the hash Recursively calls this method if the sub-relation is a hash containing more sub-relations
Edit
git clone [email protected]:casecommons/pg_search.git
cd pg_search
open
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Gitlab--ImportExport--ProjectTreeRestorer-create_sub_relations-for-pr
# Commit to gitgit add git commit -m "better docs for Gitlab::ImportExport::ProjectTreeRestorer#create_sub_relations"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Gitlab--ImportExport--ProjectTreeRestorer-create_sub_relations-for-pr
hub pull-request
# Celebrate!