Methods
Included Modules
- PgSearch::Model
Instance Public methods
rhino_search(fields, associated_fields = {})
Link
Source: show
# File rhino/rhino/lib/rhino/resource/active_record_extension/search.rb 10 def rhino_search(fields, associated_fields = {}) 11 include PgSearch::Model 12 # stores the searchable fields so it is possible to retrieve them 13 # in the open API model description 14 @rhino_is_searchable = fields.present? || associated_fields.present? 15 # FIXME: We can't autodiscover text fields because it causes a very 16 # slow reload in the development server with bigger apps 17 pg_search_scope :search_text_fields, against: fields, associated_against: associated_fields, using: { tsearch: { prefix: true } } 18 end