pg_search
https://github.com/casecommons/pg_search
Ruby
pg_search builds ActiveRecord named scopes that take advantage of PostgreSQL’s full text search
ExtractsPath#assign_ref_vars
Assigns common instance variables for views working with Git tree-ish objects Assignments are: - @id - A string representing the joined ref and path - @ref - A string representing the ref (e.g., the branch, tag, or commit SHA) - @path - A string representing the filesystem path - @commit - A Commit representing the commit from the given ref If the :id parameter appears to be requesting a specific response format, that will be handled as well. If there is no path and the ref doesn't exist in the repo, try to resolve the ref without an '.atom' suffix. If _that_ ref is found, set the request's format to Atom manually. Automatically renders `not_found!` if a valid tree path could not be resolved (e.g., when a user inserts an invalid path or ref).
Edit
git clone [email protected]:casecommons/pg_search.git
cd pg_search
open
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-ExtractsPath-assign_ref_vars-for-pr
# Commit to gitgit add git commit -m "better docs for ExtractsPath#assign_ref_vars"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-ExtractsPath-assign_ref_vars-for-pr
hub pull-request
# Celebrate!