diff --git a/lib/technoweenie/attachment_fu.rb b/lib/technoweenie/attachment_fu.rb index b62786dd..2d3032fc 100644 --- a/lib/technoweenie/attachment_fu.rb +++ b/lib/technoweenie/attachment_fu.rb @@ -131,7 +131,7 @@ def has_attachment(options = {}) end with_options(association_options) do |m| m.has_many :thumbnails, :class_name => "::#{attachment_options[:thumbnail_class]}" - m.belongs_to :parent, :class_name => "::#{base_class}" unless options[:thumbnails].empty? + m.belongs_to :parent, :class_name => "::#{base_class}", optional: true unless options[:thumbnails].empty? end storage_mod = ::Technoweenie::AttachmentFu::Backends.const_get("#{options[:storage].to_s.classify}Backend")