Sha256: 695ca2844a9ed5c550eedbfac07a8a7fe74029f419c11fec9c4f363c361f2741
Contents?: true
Size: 536 Bytes
Versions: 43
Compression:
Stored size: 536 Bytes
Contents
module Releaf::ActionController::Search extend ActiveSupport::Concern included do helper_method :searchable_fields end def searchable_fields @searchable_fields ||= Releaf::DefaultSearchableFields.new(resource_class).find end def search(text) return unless feature_available?(:search) return if text.blank? return if searchable_fields.blank? @collection = searcher_class.prepare(relation: @collection, fields: searchable_fields, text: text) end def searcher_class Releaf::Search end end
Version data entries
43 entries across 43 versions & 1 rubygems