Sha256: 5caf8b313db6626fe3308697cedc3c401ac8afe05351f3471b439d39db8cb885
Contents?: true
Size: 565 Bytes
Versions: 3
Compression:
Stored size: 565 Bytes
Contents
class FilteredArtwork include Mongoid::Document include Mongoid::FullTextSearch field :title, type: String field :colors, type: Array, default: [] fulltext_search_in :title, index_name: 'mongoid_fulltext.artworks_and_artists', filters: { is_foobar: ->(x) { x.title == 'foobar' }, is_artwork: ->(_x) { true }, is_artist: ->(_x) { false }, colors?: ->(x) { x.colors } } end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mongoid_fulltext-0.8.0 | spec/models/filtered_artwork.rb |
mongoid_fulltext-0.7.1 | spec/models/filtered_artwork.rb |
mongoid_fulltext-0.7.0 | spec/models/filtered_artwork.rb |