GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: DataMapper port of the Paperclip plugin by Thoughtbot
Homepage: http://invalidlogic.com/dm-paperclip/
Clone URL: git://github.com/krobertson/dm-paperclip.git
Renamed to use Paperclip::Resource
krobertson (author)
Wed May 14 21:59:55 -0700 2008
commit  9d44ba16e10ab40661b6f438df0673218cd1eba8
tree    adb3fd98a115193e51068568ada97e1f192c174e
parent  249a74e5b8c08c4a84681897f1f5e881edab5b93
...
54
55
56
57
58
59
60
61
62
63
...
66
67
68
 
 
 
 
 
 
69
70
71
...
54
55
56
 
 
 
 
57
58
59
...
62
63
64
65
66
67
68
69
70
71
72
73
0
@@ -54,10 +54,6 @@ module Paperclip
0
       path = [options[:image_magick_path], command].compact
0
       File.join(*path)
0
     end
0
-
0
- def included base #:nodoc:
0
- base.extend ClassMethods
0
- end
0
   end
0
 
0
   class PaperclipError < StandardError #:nodoc:
0
@@ -66,6 +62,12 @@ module Paperclip
0
   class NotIdentifiedByImageMagickError < PaperclipError #:nodoc:
0
   end
0
 
0
+ module Resource
0
+ def self.included(base)
0
+ base.extend Paperclip::ClassMethods
0
+ end
0
+ end
0
+
0
   module ClassMethods
0
     @@attachment_definitions = {}
0
 
...
59
60
61
62
 
63
64
65
...
59
60
61
 
62
63
64
65
0
@@ -59,7 +59,7 @@ def rebuild_model options = {}
0
   Dummy.class_eval do
0
     include DataMapper::Resource
0
     include DataMapper::Validate
0
- include Paperclip
0
+ include Paperclip::Resource
0
 # include Paperclip::Validations
0
     property :id, Integer, :serial => true
0
     property :other, String

Comments

    No one has commented yet.