spec/models/callbacks.rb in mongoid-eager-loading-0.2.0 vs spec/models/callbacks.rb in mongoid-eager-loading-0.3.0
- old
+ new
@@ -18,16 +18,16 @@
end
class Song
include Mongoid::Document
field :title
- embedded_in :artist, :inverse_of => :songs
+ embedded_in :artist
end
class Label
include Mongoid::Document
field :name
- embedded_in :artist, :inverse_of => :labels
+ embedded_in :artist
before_validation :cleanup
private
def cleanup
self.name = self.name.downcase.capitalize