Sha256: 3f9be87de39293cb06c99785702314ae89f5ae952ad98c5de18d48c9e9c8dc87
Contents?: true
Size: 462 Bytes
Versions: 16
Compression:
Stored size: 462 Bytes
Contents
require_dependency 'landable/search_engine' require_dependency 'landable/page' module Landable class PageSearchEngine < SearchEngine def initialize(filters, options = {}) super Page.all, filters, options end def filter_by!(filters) if ids = as_array(filters[:ids]) @scope = @scope.where(page_id: ids) end if path = filters[:path].presence @scope = @scope.with_fuzzy_path(path) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems