lib/mongo_grid/mongoid.rb in mongo_grid-0.2.6 vs lib/mongo_grid/mongoid.rb in mongo_grid-0.2.7
- old
+ new
@@ -1,8 +1,8 @@
module ::Mongoid
module Document
- %w[logo avatar attach].each do |name|
+ %w[logo avatar attach embed].each do |name|
module_eval(%Q(
def remove_#{name}
attach=self.#{name}
unless attach.blank?
id = BSON::ObjectId.from_string(attach['grid_id'])