Created
June 9, 2018 04:29
-
-
Save jordanhudgens/c5d54c423c64acb05d5b5326efb48af5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Guide < ApplicationRecord | |
include PgSearch | |
pg_search_scope :search_by_term, against: [:title, :content], | |
using: { | |
tsearch: { | |
any_word: true, | |
prefix: true | |
} | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment