simple_form_attachments 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/README.md +1 -0
- data/lib/simple_form_attachments/attachment_input.rb +8 -1
- data/lib/simple_form_attachments/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db69b98f356fc23ec406f4a46dbdd54226caf547
|
4
|
+
data.tar.gz: 93164e01fb99075461cbb3f664c7de259f860d05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a8caeedf281a7bb1b989c410896b585108b1dda35e4eb1df20343897fffd34b486a7c1caed2e78ff32f8869b137b933849b16b7ae3a57fed5ffde2d6551618f
|
7
|
+
data.tar.gz: 63e4f52d55bc312c77519e3129e9f2d906affe85b8a7ef550fdfad17cfffc51a1b07f10f12c75079882f8be2df6ed36eb02d1006bcb0e40b093354cc0d472c73
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simple_form_attachments (0.1.
|
4
|
+
simple_form_attachments (0.1.2)
|
5
5
|
jquery-ui-rails
|
6
6
|
rails (>= 4.2)
|
7
7
|
rails-assets-blueimp-file-upload (>= 9.6.0)
|
@@ -152,7 +152,7 @@ GEM
|
|
152
152
|
rails-assets-jquery (>= 1.6)
|
153
153
|
rails-assets-blueimp-load-image (1.14.0)
|
154
154
|
rails-assets-blueimp-tmpl (2.5.5)
|
155
|
-
rails-assets-handlebars (4.0.
|
155
|
+
rails-assets-handlebars (4.0.3)
|
156
156
|
rails-assets-jquery (2.1.4)
|
157
157
|
rails-deprecated_sanitizer (1.0.3)
|
158
158
|
activesupport (>= 4.2.0.alpha)
|
@@ -176,7 +176,7 @@ GEM
|
|
176
176
|
mime-types (>= 1.16, < 3.0)
|
177
177
|
netrc (~> 0.7)
|
178
178
|
shellany (0.0.1)
|
179
|
-
simple_form (3.
|
179
|
+
simple_form (3.2.0)
|
180
180
|
actionpack (~> 4.0)
|
181
181
|
activemodel (~> 4.0)
|
182
182
|
simplecov (0.10.0)
|
@@ -188,9 +188,9 @@ GEM
|
|
188
188
|
temple (~> 0.7.3)
|
189
189
|
tilt (>= 1.3.3, < 2.1)
|
190
190
|
slop (3.6.0)
|
191
|
-
sprockets (3.3.
|
192
|
-
rack (
|
193
|
-
sprockets-rails (2.3.
|
191
|
+
sprockets (3.3.5)
|
192
|
+
rack (> 1, < 3)
|
193
|
+
sprockets-rails (2.3.3)
|
194
194
|
actionpack (>= 3.0)
|
195
195
|
activesupport (>= 3.0)
|
196
196
|
sprockets (>= 2.8, < 4.0)
|
data/README.md
CHANGED
@@ -40,7 +40,7 @@ module SimpleFormAttachments
|
|
40
40
|
def input_html_options
|
41
41
|
super.merge!(
|
42
42
|
data: {
|
43
|
-
attachments_path: options.fetch(:route,
|
43
|
+
attachments_path: options.fetch(:route, route_from_configuration),
|
44
44
|
max_number_of_files: options.fetch(:max_number_of_files, nil),
|
45
45
|
disabled_submit_text: I18n.t(:disabled, scope: 'simple_form_attachments.buttons'),
|
46
46
|
sortable: sortable?.to_s
|
@@ -54,6 +54,13 @@ module SimpleFormAttachments
|
|
54
54
|
|
55
55
|
# ---------------------------------------------------------------------
|
56
56
|
|
57
|
+
def route_from_configuration
|
58
|
+
res = AttachmentInput.configuration.route
|
59
|
+
res.respond_to?(:call) ? res.call : res
|
60
|
+
end
|
61
|
+
|
62
|
+
# ---------------------------------------------------------------------
|
63
|
+
|
57
64
|
def relation
|
58
65
|
return unless @builder
|
59
66
|
return unless @builder.object
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_attachments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|