simple_form 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -0
- data/lib/simple_form/form_builder.rb +3 -4
- data/lib/simple_form/version.rb +1 -1
- data/test/form_builder/general_test.rb +1 -1
- data/test/support/models.rb +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33ed74564d4101bac4d57185cb4f6353efd54710777b7b62164238a4d3df1157
|
4
|
+
data.tar.gz: 524a1c33d2f856eec0be831200a57bde6c9823ac05b3e34bdb12daf23b6b25b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26391a5a691422cf7956107e39273142e63fa3a4804f26e76fb722d70dbc868e1090fa04278f652dd1310c3d3a74e4affcea8864219d4bd09dc4aacd567e21f5
|
7
|
+
data.tar.gz: 05e515e1eacfe356c45409ad4db258a6da6ed4760050ccf8e44ec4e6ad7430a3f6ace82fd2392452d59fa5b38e1b94356415d0a478b029679abd861d03dd4a94
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
## 5.0.1
|
4
|
+
|
5
|
+
### Bug fix
|
6
|
+
* Replace `_url` with `remote_url` when trying to guess file inputs [@tegon](https://github.com/tegon). This has the side-effect of changing carrierwave's support from `0.2.1` to `0.2.2`.
|
7
|
+
|
3
8
|
## 5.0.0
|
4
9
|
|
5
10
|
### Enhancements
|
data/README.md
CHANGED
@@ -1233,6 +1233,8 @@ sending us a pull request.
|
|
1233
1233
|
|
1234
1234
|
https://github.com/plataformatec/simple_form/issues
|
1235
1235
|
|
1236
|
+
If you have discovered a security related bug, please do NOT use the GitHub issue tracker. Send an e-mail to opensource@plataformatec.com.br.
|
1237
|
+
|
1236
1238
|
## Maintainers
|
1237
1239
|
|
1238
1240
|
* José Valim (https://github.com/josevalim)
|
@@ -580,18 +580,17 @@ module SimpleForm
|
|
580
580
|
#
|
581
581
|
# Note: This does not support multiple file upload inputs, as this is very application-specific.
|
582
582
|
#
|
583
|
-
# The order here was
|
584
|
-
# with the suffix `_url` is present in three Gems, so it's checked with priority:
|
583
|
+
# The order here was chosen based on the popularity of Gems:
|
585
584
|
#
|
586
585
|
# - `#{attribute_name}_attachment` - ActiveStorage >= `5.2` and Refile >= `0.2.0` <= `0.4.0`
|
587
|
-
# -
|
586
|
+
# - `remote_#{attribute_name}_url` - Refile >= `0.3.0` and CarrierWave >= `0.2.2`
|
588
587
|
# - `#{attribute_name}_attacher` - Refile >= `0.4.0` and Shrine >= `0.9.0`
|
589
588
|
# - `#{attribute_name}_file_name` - Paperclip ~> `2.0` (added for backwards compatibility)
|
590
589
|
#
|
591
590
|
# Returns a Boolean.
|
592
591
|
def file_method?(attribute_name)
|
593
592
|
@object.respond_to?("#{attribute_name}_attachment") ||
|
594
|
-
@object.respond_to?("#{attribute_name}_url") ||
|
593
|
+
@object.respond_to?("remote_#{attribute_name}_url") ||
|
595
594
|
@object.respond_to?("#{attribute_name}_attacher") ||
|
596
595
|
@object.respond_to?("#{attribute_name}_file_name")
|
597
596
|
end
|
data/lib/simple_form/version.rb
CHANGED
@@ -244,7 +244,7 @@ class FormBuilderTest < ActionView::TestCase
|
|
244
244
|
assert_select 'form input#user_with_attachment_avatar.file'
|
245
245
|
end
|
246
246
|
|
247
|
-
test 'builder generates file input for
|
247
|
+
test 'builder generates file input for Refile >= 0.3.0 and CarrierWave >= 0.2.2' do
|
248
248
|
with_form_for UserWithAttachment.build, :cover
|
249
249
|
assert_select 'form input#user_with_attachment_cover.file'
|
250
250
|
end
|
data/test/support/models.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Valim
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-
|
13
|
+
date: 2019-10-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activemodel
|
@@ -162,15 +162,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
162
162
|
requirements:
|
163
163
|
- - ">="
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version:
|
165
|
+
version: 2.3.0
|
166
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
168
|
- - ">="
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0'
|
171
171
|
requirements: []
|
172
|
-
|
173
|
-
rubygems_version: 2.7.3
|
172
|
+
rubygems_version: 3.0.6
|
174
173
|
signing_key:
|
175
174
|
specification_version: 4
|
176
175
|
summary: Forms made easy!
|