rails-uploader 0.5.3 → 0.5.4

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
  SHA256:
3
- metadata.gz: e05f5c580e91d0d0b2702ad285f746f97afeffefd8c114088b96136bde737f8d
4
- data.tar.gz: 9b7f11b41d7dc7ec839e570a1889e140f09b0866231fc8a5d4dfe545b1e5ed54
3
+ metadata.gz: 566c841fcb9d098a1b256c3aff94e01950cdbb0ace03d1c657e8d9fa3c114314
4
+ data.tar.gz: 4ac9416e87c31176a81392e1a958fc90e65f3cc5c70d7faf72e37fdadcb21053
5
5
  SHA512:
6
- metadata.gz: 9c0f890979f7ae8a766d6a2957a86c390ffa65413e90aaa5d996399728eab61e8398ccab92303010442154c2da261f6123571847f2e7688e110c3c5d657ea5d3
7
- data.tar.gz: 3ee71e85c530ca477922d7d591ce5e2bad65c864b3fbd9535acf069d092ccb06c7ee109fa25583f72bebb26e8acd269bd62ea69dd49298f50f6e9216306dc54d
6
+ metadata.gz: d535a4a9a2c9e40d24826c586f6ebf006934f3194f4600390e783659eadbe37955474b8430a1843ed8db6841afc13998cbaf46e2b935a88bc651fccf8806f33c
7
+ data.tar.gz: 1ddd6948b2fd9c202b1a1bfeb9ce491964823bd7a3b861a33f2ad34b7c7e09fd6b452c1b5da312344ccdc9f9de1c6b8f8e42c45a2bcd40489f872f4fedf2e322
@@ -76,7 +76,7 @@ module Uploader
76
76
  @input_html ||= { multiple: multiple?, class: 'uploader' }.merge(input_html_options)
77
77
  @input_html[:data] ||= {}
78
78
  @input_html[:data][:url] ||= attachments_path(singular: !multiple?)
79
- @input_html[:accept] ||= extension_whitelist
79
+ @input_html[:accept] ||= extract_extension_whitelist
80
80
  @input_html
81
81
  end
82
82
 
@@ -84,7 +84,8 @@ module Uploader
84
84
  @options.reject { |key, _value| RESERVED_OPTIONS_KEYS.include?(key.to_s) }
85
85
  end
86
86
 
87
- def extension_whitelist
87
+ def extract_extension_whitelist
88
+ return unless klass.respond_to?(:uploaders)
88
89
  return unless klass.uploaders[:data].try(:const_defined?, :EXTENSION_WHITELIST)
89
90
 
90
91
  exts = klass.uploaders[:data]::EXTENSION_WHITELIST
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uploader
4
- VERSION = '0.5.3'
4
+ VERSION = '0.5.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-uploader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Galeta
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-04-09 00:00:00.000000000 Z
12
+ date: 2022-01-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: carrierwave