Sha256: fee9f0350a8a4c9dbb536ca8426426f71d4e66ce83a1df8f9285eff8bfafeadd
Contents?: true
Size: 530 Bytes
Versions: 17
Compression:
Stored size: 530 Bytes
Contents
require './helper' class FilterEx include MongoMapper::Document include MongoMapperExt::Filter key :title, String key :body, String filterable_keys :title, :body end FilterEx.delete_all o1 = FilterEx.create(:title => "A Great Title", :body => "A great Body") o2 = FilterEx.create(:title => "A Good Title", :body => "A good Body") puts "filter: #{FilterEx.filter("title").size}" puts "filter: #{FilterEx.filter("title", :limit => 1).inspect}" puts "filter: #{FilterEx.filter("great").inspect}" FilterEx.delete_all
Version data entries
17 entries across 17 versions & 1 rubygems