app/lib/trade_tariff_backend.rb
# Returns search index instance for given model instance or
# model class instance
Returns search index instance for given model instance or
model class instance
Returns search index instance for given model instance or model class instance
def search_index_for(namespace, model)
      index_name = model.is_a?(Class) ? model : model.class
      "::#{namespace.capitalize}::#{index_name}Index".constantize.new(search_namespace)
    end
def search_index_for ( namespace , model ) index_name = model . is_a? ( Class ) ? model : model . class "::#{namespace.capitalize}::#{index_name}Index" . constantize . new ( search_namespace ) end
Returns search index instance for given model instance or
model class instance
Returns search index instance for given model instance or model class instance
namespace
model