image_input 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/image_input/_input.html.erb +1 -0
- data/lib/image_input/helpers.rb +3 -2
- data/lib/image_input/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52ebcc38110ac7d9c868744d36485ac2bc336b90d0b6f1651acef5711546655e
|
4
|
+
data.tar.gz: 8fcd2c947ae62c09ffb1a88cf07be82c85e20696b94ba4f52f06cc3c1186c947
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d53fc39c634346f0210d738de9282090b669def6282e47ed3a496b509f3db789472f1401bc390e2ff9689c6a5100c7ccfb91a0bf76cb1186dff627f29f90954d
|
7
|
+
data.tar.gz: 86da5d9f0f2f9f64d89c85f89abc6d7dcb843eb991bb98dc9b2d1146bc7ca16c4ce09cef931c4a2e3d3e9dcbd2d4621c87b21726556c15b5b7d34d9fcf0d4865
|
data/lib/image_input/helpers.rb
CHANGED
@@ -2,13 +2,14 @@
|
|
2
2
|
|
3
3
|
module ImageInput
|
4
4
|
module Helpers
|
5
|
-
def image_input(form, field, accept: %i(png jpeg gif))
|
5
|
+
def image_input(form, field, accept: %i(png jpeg gif), direct_upload: true)
|
6
6
|
render(
|
7
7
|
'image_input/input',
|
8
8
|
form: form,
|
9
9
|
field: field,
|
10
10
|
blob: form.object.public_send(field),
|
11
|
-
accept: accept.map { |a| Mime[a].to_s }.join(',')
|
11
|
+
accept: accept.map { |a| Mime[a].to_s }.join(','),
|
12
|
+
direct_upload: direct_upload
|
12
13
|
)
|
13
14
|
end
|
14
15
|
end
|
data/lib/image_input/version.rb
CHANGED