Skip to content

Instantly share code, notes, and snippets.

@padde
Created January 8, 2015 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save padde/024d534cd0c269c238c6 to your computer and use it in GitHub Desktop.
Save padde/024d534cd0c269c238c6 to your computer and use it in GitHub Desktop.
Post model with pg_search
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