Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (20 sloc) 594 Bytes
require File.expand_path '../../../server/lib/picky', __FILE__
Person = :id, :first, :last
# An example where you give the Picky index
# an #each source.
data = :people do
source do
[, 'Donald', 'Knuth'),, 'Niklaus', 'Wirth'),, 'Donald', 'Worth'),, 'Peter', 'Niklaus')]
category :first
category :last
people = data
data.reindex # == data.index; data.load
results = 'donald'
# p results.allocations
fail __FILE__ unless results.ids == [1, 3]
Something went wrong with that request. Please try again.