pg_search

https://github.com/casecommons/pg_search

Ruby

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

Notify#subject

Formats arguments into a String suitable for use as an email subject

extra - Extra Strings to be inserted into the subject

Examples

  >> subject('Lorem ipsum')
  => "Lorem ipsum"

  # Automatically inserts Project name when @project is set
  >> @project = Project.last
  => #<Project id: 1, name: "Ruby on Rails", path: "ruby_on_rails", ...>
  >> subject('Lorem ipsum')
  => "Ruby on Rails | Lorem ipsum "

  # Accepts multiple arguments
  >> subject('Lorem ipsum', 'Dolor sit amet')
  => "Lorem ipsum | Dolor sit amet"

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-Notify-subject-for-pr


# Commit to git

git add git commit -m "better docs for Notify#subject"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-Notify-subject-for-pr

hub pull-request


# Celebrate!