Sha256: 9b693ab9cf96251bc120dd7303600f5a65ec82655cc8347d65dd50fb8f74fbf0

Contents?: true

Size: 426 Bytes

Versions: 1

Compression:

Stored size: 426 Bytes

Contents

require 'active_support'
require 'active_support/core_ext'
require 'dynamic_sunspot_search/version'
require 'dynamic_sunspot_search/translator'

module DynamicSunspotSearch
  def self.included(base)
    base.extend ClassMethods
  end

  module ClassMethods
    def dynamic_sunspot_search(query_hash, search_options={})
      search(search_options) do
        Translator.translate(self, query_hash)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dynamic_sunspot_search-0.1.0 lib/dynamic_sunspot_search.rb