lib/dm-paperclip.rb in dm-paperclip-2.1.2 vs lib/dm-paperclip.rb in dm-paperclip-2.1.2.1
- old
+ new
@@ -35,11 +35,11 @@
# Only include validations if dm-validations is loaded
require File.join(File.dirname(__FILE__), 'dm-paperclip', 'validations') unless defined?(DataMapper::Validate).nil?
module Paperclip
- VERSION = "2.1.2"
+ VERSION = "2.1.2.1"
class << self
# Provides configurability to Paperclip. There are a number of options available, such as:
# * whiny_thumbnails: Will raise an error if Paperclip cannot process thumbnails of
# an uploaded image. Defaults to true.
# * image_magick_path: Defines the path at which to find the +convert+ and +identify+
@@ -212,18 +212,14 @@
end
end
def destroy_attached_files
each_attachment do |name, attachment|
- attachment.queue_existing_for_delete
- attachment.flush_deletes
+ attachment.send(:queue_existing_for_delete)
+ attachment.send(:flush_deletes)
end
end
end
end
-# Set it all up.
-if Object.const_defined?("ActiveRecord")
- ActiveRecord::Base.send(:include, Paperclip)
- File.send(:include, Paperclip::Upfile)
-end
+File.send(:include, Paperclip::Upfile)