spec/app/models/animal.rb in mongoid-6.4.8 vs spec/app/models/animal.rb in mongoid-7.0.0.beta
- old
+ new
@@ -7,10 +7,11 @@
field :height, type: Integer
field :weight, type: Integer
field :tags, type: Array
embedded_in :person
- embedded_in :circus
+ embedded_in :circus, class_name: 'Circus' # class_name is necessary because ActiveRecord think the singular of Circus
+ # is Circu
validates_format_of :name, without: /\$\$\$/
accepts_nested_attributes_for :person