lib/attachment_magick.rb in attachment_magick-0.3.1 vs lib/attachment_magick.rb in attachment_magick-0.3.2
- old
+ new
@@ -17,11 +17,11 @@
end
included do
cattr_accessor :attachment_magick_default_options
- if AttachmentMagick.configuration.orms.include?("Mongoid")
- embeds_many :images, :class_name => "AttachmentMagick::MongoidImage", :polymorphic => true if self.include?(Mongoid::Document)
+ if AttachmentMagick.configuration.orms.include?("Mongoid")
+ embeds_many :images, :as => :imageable, :class_name => "AttachmentMagick::MongoidImage" if self.include?(Mongoid::Document)
end
if AttachmentMagick.configuration.orms.include?("ActiveRecord")
has_many :images, :class_name => "AttachmentMagick::ActiveRecordImage", :as => :imageable, :dependent => :destroy if self.include?(ActiveRecord::Persistence)
end
\ No newline at end of file