From fc5fdd3db27abe5d3dffb93c47b624381b150b57 Mon Sep 17 00:00:00 2001 From: Bilal Date: Thu, 16 Apr 2020 15:28:28 +0200 Subject: [PATCH] add model with two default fields --- spec/support/models.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/support/models.rb b/spec/support/models.rb index 58d632c..58daa0f 100755 --- a/spec/support/models.rb +++ b/spec/support/models.rb @@ -5,6 +5,12 @@ class VectorModel < ActiveRecord::Base pg_search fields: %i[vector_models.id vector_models.name vector_models.value], cache: :search_cache end +class VectorModelWithTwoDefaultColumns < ActiveRecord::Base + self.table_name = :vector_models + include PgSearchable + pg_search fields: %i[vector_models.id vector_models.name vector_models.value], default_fields: %i[vector_models.name vector_models.value], cache: :search_cache +end + class VectorModelWithMappings < ActiveRecord::Base self.table_name = :vector_models include PgSearchable