Skip to content

Instantly share code, notes, and snippets.

@MaryKuz
Created March 28, 2019 10:13
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 MaryKuz/391a18451ed516fabf329d82ff45c9bf to your computer and use it in GitHub Desktop.
Save MaryKuz/391a18451ed516fabf329d82ff45c9bf to your computer and use it in GitHub Desktop.
Add code to the file
class Product < ActiveRecord::Base
include PgSearch
pg_search_scope :search,
against: {
name: :A,
description: :B
},
using: {
tsearch: { dictionary: :english }
}
....
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment