simple_form_fileinput 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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dca876a79cd021608978528d458a9737570c5c7
|
4
|
+
data.tar.gz: a60ec3a64abb2d7953a6fb54fe3507a7377facab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28d3e7c7a965d3616e178aaddf8422aa44b7ecdd45950d925c2e23db4fdba749662e63473c6471b4d28178b7323452585f81c670c5d922f8bca61dc984ec6cb1
|
7
|
+
data.tar.gz: 48a06ce5501e70717f80c58a6be167c5f3cb65f6a55cc76c5d07f3fce80d6858ea57c8fd9ac5eecffc1ad596a3fb9ac59a363201da3e1b902117b9f69ea9a6a4
|
@@ -1,15 +1,17 @@
|
|
1
1
|
module SimpleForm
|
2
2
|
module Inputs
|
3
3
|
class FileInput < Base
|
4
|
-
def input
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
def input(wrapper_options)
|
5
|
+
merged_input_options = merge_wrapper_options input_html_options, wrapper_options
|
6
|
+
merged_input_options[:data] ||= {}
|
7
|
+
if Rails.env.test?
|
8
|
+
merged_input_options[:data][:bfi_disabled] = true
|
8
9
|
else
|
9
|
-
|
10
|
+
merged_input_options[:title] = 'Drop a file here, or click to browse...'
|
11
|
+
merged_input_options[:data][:filename_placement] = 'inside'
|
10
12
|
end
|
11
|
-
@builder.file_field(attribute_name,
|
13
|
+
@builder.file_field(attribute_name, merged_input_options)
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
15
|
-
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_fileinput
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- smit1625
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|