Sha256: 0767236d34de6fe7bfa6d2ec74bc3e00716ef6306ca6dbf81005164096e4d21c

Contents?: true

Size: 252 Bytes

Versions: 9

Compression:

Stored size: 252 Bytes

Contents

Locomotive::Liquid::Drops::Site.class_eval do
  def search
    text        = @context.registers[:controller].params[:search]
    conditions  = { 'site_id' => @_source.id }

    @search ||= ::ActiveSearch.search(text, conditions, radius: 150)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
locomotivecms-search-0.3.6 lib/locomotive/search/concerns/locomotive/liquid/drops/site.rb
locomotivecms-search-0.3.5 lib/locomotive/search/concerns/locomotive/liquid/drops/site.rb
locomotivecms-search-0.3.4 lib/locomotive/search/concerns/locomotive/liquid/drops/site.rb
locomotivecms-search-0.3.3 lib/locomotive/search/concerns/locomotive/liquid/drops/site.rb
locomotivecms-search-0.3.2 lib/locomotive/search/concerns/locomotive/liquid/drops/site.rb
locomotivecms-search-0.3.0 lib/locomotive/search/concerns/locomotive/liquid/drops/site.rb
locomotivecms-search-0.2.8 lib/locomotive/search/concerns/locomotive/liquid/drops/site.rb
locomotivecms-search-0.2.7 lib/locomotive/search/concerns/locomotive/liquid/drops/site.rb
locomotivecms-search-0.2.6 lib/locomotive/search/concerns/locomotive/liquid/drops/site.rb