Module: Tramway::Warnings

Defined in:
lib/tramway/warnings.rb

Overview

Warnings module provides methods to log warnings for different scenarios

Class Method Summary collapse

Class Method Details

.search_fallback(model_class) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/tramway/warnings.rb', line 8

def search_fallback(model_class)
  Rails.logger.warn(
    "Tramway search: `#{model_class}.search` is not defined. " \
    "Falling back to `#{model_class}.tramway_search`. " \
    'This is a generic fallback and not tailored to your data structure, ' \
    'so it is not intended for long-term use and may be slow or not scalable.'
  )
end