Sha256: 73b897e67c43b839f71e8568d11439f09c3b44a52fff134071d536926a757a01
Contents?: true
Size: 531 Bytes
Versions: 1
Compression:
Stored size: 531 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongoid_fulltext-0.8.2 | spec/models/filtered_artwork.rb |