glebtv-rails-uploader 0.7.0 → 0.7.1

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: 542e7d5efe16cea7e1074133e9784791ee68c5c8
4
- data.tar.gz: 4ca4aa11d2ddf6c3a0d2bd33f72e9f70c6efaaa0
3
+ metadata.gz: 9423712bd2f3477c062998585b1c69902a4006e2
4
+ data.tar.gz: 04b3343dc2b53618b2d2d3041b3258594221fdde
5
5
  SHA512:
6
- metadata.gz: 71b09543a5cfbb607fbbf2e506a01e45ca7750f753b71a3536cac3acaa16cd0f55d8ec04fb6622d27906722a8441c1ae8634ca3dbbb71fe1495fd69d0bb60083
7
- data.tar.gz: 44bc59b0fed0c68fc782d106d184d40b0cc705aa974201db68b963802012b73e99034ec10b849bcaf56cabe66539d0240a786bba40abd076249ba35cc9db1d17
6
+ metadata.gz: 09ff2073da321b21b2c800215d766c00901dc43a1aeddd9ed5b5b7d689abcca49f98837bef687b037c786ad4e3a02137ce8ed32a33381431ec3ead2508a8f50c
7
+ data.tar.gz: 6d7fbae5ae3ba1da07723430362d1d3169c314a375bb66537a8f9fae8dac647e4bd100bea14b7821ecdfcb082ac23742b49ca43e79ce208a2a3e97abd8b35c11
@@ -42,8 +42,9 @@
42
42
 
43
43
  <% if field.exists? -%>
44
44
  uploader = ($(this).data('blueimp-fileupload') || $(this).data('fileupload'));
45
+ <% fv = field.values.sort_by {|s| s.sort.nil? ? 0 : s.sort }.map(&:to_jq_upload) %>
45
46
  uploader
46
- ._renderDownload(<%=raw field.values.sort_by {|s| s.sort.nil? ? 0 : s.sort }.map(&:to_jq_upload).to_json %>)
47
+ ._renderDownload(<%=raw (field.multiple? ? fv : fv[0]).to_json %>)
47
48
  .appendTo(container);
48
49
  <% end -%>
49
50
  });
@@ -1,3 +1,3 @@
1
1
  module Uploader
2
- VERSION = "0.7.0".freeze
2
+ VERSION = "0.7.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glebtv-rails-uploader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Galeta