spec/models/partitioned_artist.rb in mongoid_fulltext-0.6.1 vs spec/models/partitioned_artist.rb in mongoid_fulltext-0.7.0
- old
+ new
@@ -1,15 +1,14 @@
class PartitionedArtist
include Mongoid::Document
include Mongoid::FullTextSearch
-
+
field :full_name
- field :exhibitions, :type => Array, :default => []
-
- fulltext_search_in :full_name,
- :index_name => 'mongoid_fulltext.partitioned_artists',
- :filters => {
- :has_exhibitions => lambda { |x| x.exhibitions.size > 0 },
- :exhibitions => lambda { |x| [ x.exhibitions ].flatten },
- }
+ field :exhibitions, type: Array, default: []
+ fulltext_search_in :full_name,
+ index_name: 'mongoid_fulltext.partitioned_artists',
+ filters: {
+ has_exhibitions: ->(x) { x.exhibitions.size > 0 },
+ exhibitions: ->(x) { [x.exhibitions].flatten }
+ }
end