pg_search

https://github.com/casecommons/pg_search

Ruby

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

ButtonHelper#clipboard_button

Output a "Copy to Clipboard" button

data  - Data attributes passed to `content_tag` (default: {}):
        :text   - Text to copy (optional)
        :gfm    - GitLab Flavored Markdown to copy, if different from `text` (optional)
        :target - Selector for target element to copy from (optional)

Examples:

  # Define the clipboard's text
  clipboard_button(text: "Foo")
  # => "<button class='...' data-clipboard-text='Foo'>...</button>"

  # Define the target element
  clipboard_button(target: "div#foo")
  # => "<button class='...' data-clipboard-target='div#foo'>...</button>"

See http://clipboardjs.com/#usage

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-ButtonHelper-clipboard_button-for-pr


# Commit to git

git add git commit -m "better docs for ButtonHelper#clipboard_button"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-ButtonHelper-clipboard_button-for-pr

hub pull-request


# Celebrate!