uploadbox 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uploadbox/image_uploader.rb +7 -6
- data/lib/uploadbox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13f326265b3fb80736e6d4633d5ce004b37cdbed
|
4
|
+
data.tar.gz: b77462b629b66414c184f12eefd8e77b49313a1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20dd5bcfc6f78420ec78ce2e3fe66e85f9b8bd4da8ef8e341938c06584e14d3ccd7b04f4913ab026400a634e4f9e185cf0a3f9899cb5e92b6cbe92bdbe824c89
|
7
|
+
data.tar.gz: 9dd814458c11e5c8ffe28e594b26dc6cfe813f127d34d8644724569c632448fe22e33fb63a156a3a72755794305c25a6f1c0d3043b5664e538eaaa3aa6495455
|
@@ -16,9 +16,9 @@ module Uploadbox
|
|
16
16
|
upload_class_name = imageable_type + upload_name.to_s.camelize
|
17
17
|
upload_class = Class.new(Image)
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
return if Uploadbox.const_defined?(upload_class_name)
|
20
|
+
|
21
|
+
Uploadbox.const_set(upload_class_name, upload_class)
|
22
22
|
|
23
23
|
# @post.picture?
|
24
24
|
define_method("#{upload_name}?") do
|
@@ -86,6 +86,7 @@ module Uploadbox
|
|
86
86
|
|
87
87
|
# Uploabox::PostPictureUploader < UploadBox::ImgProcessing < CarrierWave
|
88
88
|
dynamic_uploader = Class.new(Uploadbox::ImageProcessingUploader)
|
89
|
+
|
89
90
|
unless Uploadbox.const_defined?(self.name.demodulize + 'Uploader')
|
90
91
|
Uploadbox.const_set(self.name.demodulize + 'Uploader', dynamic_uploader)
|
91
92
|
end
|
@@ -140,9 +141,9 @@ module Uploadbox
|
|
140
141
|
upload_class_name = imageable_type + upload_name.to_s.camelize
|
141
142
|
upload_class = Class.new(Image)
|
142
143
|
|
143
|
-
|
144
|
-
|
145
|
-
|
144
|
+
return if Uploadbox.const_defined?(upload_class_name)
|
145
|
+
|
146
|
+
Uploadbox.const_set(upload_class_name, upload_class)
|
146
147
|
|
147
148
|
# @post.images?
|
148
149
|
define_method("#{upload_name}?") do
|
data/lib/uploadbox/version.rb
CHANGED