Sha256: 4f9af0029b1bbed0dd6ccbedb79b3f0d810f31b3614811277f7ed2d493781da4
Contents?: true
Size: 892 Bytes
Versions: 15
Compression:
Stored size: 892 Bytes
Contents
module Sunspot module DSL # # This top-level DSL class is the context in which the block passed to # Sunspot.query. See Sunspot::DSL::StandardQuery, Sunspot::DSL::FieldQuery, # and Sunspot::DSL::Scope for the full API presented. # class Search < StandardQuery def initialize(search, setup) #:nodoc: @search = search super(search, search.query, setup) end # # Retrieve the data accessor used to load instances of the given class # out of persistent storage. Data accessors are free to implement any # extra methods that may be useful in this context. # # ==== Example # # Sunspot.search Post do # data_accessor_for(Post).include = [:blog, :comments] # end # def data_accessor_for(clazz) @search.data_accessor_for(clazz) end end end end
Version data entries
15 entries across 15 versions & 2 rubygems