bullet_train-super_scaffolding 1.7.17 → 1.7.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bullet_train/super_scaffolding/version.rb +1 -1
- data/lib/scaffolding/attribute.rb +2 -2
- data/lib/scaffolding/script.rb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97ac537cf45ae3404149f8cdfc4496d3af7fea1f50a85ae2b65f572ee7fcda35
|
4
|
+
data.tar.gz: 5e25e6a6bc6040e68a8aad37e322e72d1613ed0fb433393e3fd01808c79d64df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b7049fdb612615b1c6b85b38246539d5c99240308b2ed4c16d0011da3948fb66a40df04a8b95a7ce91c6f479da5bf49e88d7ad838ee6d70f6500d2b67f208ee
|
7
|
+
data.tar.gz: 54fcfbd4134ed0b3923c2d7c34e6ea727d757a13e03c56a8bf5f6d7def601b2c6f1a29eaaaea026a1d0ddea57921e52332d6c64fbc54c68429bb909ae0915d73
|
@@ -178,10 +178,10 @@ class Scaffolding::Attribute
|
|
178
178
|
# TODO: We're preserving cloudinary_image here for backwards compatibility.
|
179
179
|
# Remove it in a future major release.
|
180
180
|
options[:height] = 200
|
181
|
-
"image"
|
181
|
+
"image#{"s" if is_multiple?}"
|
182
182
|
when "image"
|
183
183
|
options[:height] = 200
|
184
|
-
"image"
|
184
|
+
"image#{"s" if is_multiple?}"
|
185
185
|
when "phone_field"
|
186
186
|
"phone_number"
|
187
187
|
when "date_field"
|
data/lib/scaffolding/script.rb
CHANGED
@@ -146,11 +146,21 @@ def check_required_options_for_attributes(scaffolding_type, attributes, child, p
|
|
146
146
|
{}
|
147
147
|
end
|
148
148
|
|
149
|
+
if type == "image" && cloudinary_enabled? && attribute_options[:multiple]
|
150
|
+
puts "You have Cloudinary enabled and tried to scaffold an image field with the `multiple` option. " \
|
151
|
+
"At this time we do not support multiple images in a single Cloudinary image attribute. " \
|
152
|
+
"We hope to add support for it in the future. " \
|
153
|
+
"For now you could use individual named image attributes, or you might try disabling Cloudinary and using ActiveStorage.".red
|
154
|
+
exit
|
155
|
+
end
|
156
|
+
|
149
157
|
data_type = if type == "image" && cloudinary_enabled?
|
150
158
|
"string"
|
151
159
|
elsif attribute_options[:multiple]
|
152
160
|
case type
|
153
|
-
when "
|
161
|
+
when "file_field"
|
162
|
+
"attachments"
|
163
|
+
when "image"
|
154
164
|
"attachments"
|
155
165
|
else
|
156
166
|
"jsonb"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-super_scaffolding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|