Browse files

Fix stupid mistake with the destroy handler, 2.1.2.1

  • Loading branch information...
1 parent 3f1927c commit 0908d720ec9a89403acabad324ba469b1321d639 @krobertson krobertson committed May 15, 2008
Showing with 5 additions and 10 deletions.
  1. +1 −2 init.rb
  2. +4 −8 lib/dm-paperclip.rb
View
3 init.rb
@@ -1,2 +1 @@
-require File.join(File.dirname(__FILE__), 'lib', 'dm-paperclip')
-File.send :include, Paperclip::Upfile
+require File.join(File.dirname(__FILE__), 'lib', 'dm-paperclip')
View
12 lib/dm-paperclip.rb
@@ -37,7 +37,7 @@
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
@@ -214,16 +214,12 @@ def save_attached_files
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)

0 comments on commit 0908d72

Please sign in to comment.