lol_multiple_uploads 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/upload_helper.rb +6 -2
- data/lib/lol_multiple_uploads/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: 6c5650e82217e5c08b044463b9c54f689384d6e1
|
4
|
+
data.tar.gz: 0a29ec3a4809287ea4e288a8e757f3a6911f0c4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c753f3349457e2e9892f1633db90185baf5fbd69e950c16ac31097acf7da0c4b27c0f6206e3e745139ce0646bdc293f465ffb5850cec3e65392d8576e1c7473f
|
7
|
+
data.tar.gz: 8deac0c34293b2e54e2164ad6e1568a4233e7089e680282653cab7bd67649e2f891fa4c1251e3c7e8ad3c73f989717244c677c1e6dc0936c90a568cf2b67b55f
|
@@ -1,5 +1,9 @@
|
|
1
1
|
module UploadHelper
|
2
|
-
def upload_link(name='Upload File',
|
3
|
-
|
2
|
+
def upload_link(name='Upload File', options={})
|
3
|
+
object = options[:object] || nil
|
4
|
+
image_container = options[:image_container] || '.images-container'
|
5
|
+
photo_version = options[:photo_version] || :gallery_thumb
|
6
|
+
|
7
|
+
link_to(name, 'javascript://', class: 'multiple_upload', 'data-model' => object.class, 'data-model-id' => object.id, 'data-store-path' => upload_image_path(format: 'js'), 'data-file-picker-key' => "#{PICKER_KEY}", 'data-image-container' => image_container, 'data-photo-version' => photo_version) unless object.nil? || object.new_record?
|
4
8
|
end
|
5
9
|
end
|