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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16bd3b2e7b22ff853049e73e92789e0dc12c95c6
4
- data.tar.gz: 630591e00c7e84f43b6eda40406c05335caf0cb2
3
+ metadata.gz: 6c5650e82217e5c08b044463b9c54f689384d6e1
4
+ data.tar.gz: 0a29ec3a4809287ea4e288a8e757f3a6911f0c4e
5
5
  SHA512:
6
- metadata.gz: 36521194c095667f84452b2b236025375990bc588451feed38074dada79bb23b18ce7c903ee695c1e696eaf0e18694b3fd60de3af1a50848ace9b808d13738c9
7
- data.tar.gz: e130fab2f91b33a5b31c40eec144e0e0081171e912c6296be57cd5a0d9f6f8b78783cc79650d9ad5586bf0e02602f1d0ea13423d787afc4e52d4a93c84dd4498
6
+ metadata.gz: c753f3349457e2e9892f1633db90185baf5fbd69e950c16ac31097acf7da0c4b27c0f6206e3e745139ce0646bdc293f465ffb5850cec3e65392d8576e1c7473f
7
+ data.tar.gz: 8deac0c34293b2e54e2164ad6e1568a4233e7089e680282653cab7bd67649e2f891fa4c1251e3c7e8ad3c73f989717244c677c1e6dc0936c90a568cf2b67b55f
@@ -1,5 +1,9 @@
1
1
  module UploadHelper
2
- def upload_link(name='Upload File', object=nil, image_container='.images-container', photo_version=:gallery_thumb)
3
- 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?
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
@@ -1,3 +1,3 @@
1
1
  module LolMultipleUploads
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lol_multiple_uploads
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Zaghi