Created
January 8, 2015 15:05
-
-
Save padde/024d534cd0c269c238c6 to your computer and use it in GitHub Desktop.
Post model with pg_search
This file contains 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 Post < ActiveRecord::Base | |
include PgSearch | |
pg_search_scope :search, | |
against: :body, | |
using: {tsearch: {dictionary: 'german'}} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment