pg_rails 7.0.8.pre.alpha.49 → 7.0.8.pre.alpha.50

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
  SHA256:
3
- metadata.gz: e581dd4c81531afed6bfe73d96684ab134e13dc3869005a1f87f0415d688aadc
4
- data.tar.gz: 922060c4601548d04886c8039a4e45838dc0c4888d687c0b7bd37d97a7ec58bc
3
+ metadata.gz: ec90b6f4737df51fd11299a90574cd3ad866c7836aae3dbca2ee92e233839ba4
4
+ data.tar.gz: 8f16fc698d6a2ae0da96671b478c3a4d1cdefd4ff191a82e6f513e26c8ca9783
5
5
  SHA512:
6
- metadata.gz: 51d205aa87b4d72bd83dd928b964025e42411360e4898151a43cb560bb202047bffa335071a01585fb456980614239bf61263cd06a18e351c761e0f9bfc059f2
7
- data.tar.gz: cfc775c83ff7ffa2932b4f024a16406cd1f5198174b526d7f6f33b2d3b358626acd0da69125dc41a3ac2f63f4075196c50c7e75560cb2ae63c8f7ae77829f620
6
+ metadata.gz: 1e95e14b14a79a2ceeb30713ce56e44413f14a35affc51262ec0fc9ebfca7e283e19874566444a22241e128a0b4745f228148f838ff12aef22c36e1de9c62370
7
+ data.tar.gz: 6cab64c3dc2a6492a14b2b8af5c7d0b5d28752eae52e3e36d6543a4f81ee7289c38e78212e0835108e35f598485cf269b334527ac8a43ca26f4e64dba29a3fbd
@@ -43,6 +43,8 @@ class PgFormBuilder < SimpleForm::FormBuilder
43
43
  end
44
44
 
45
45
  def associations
46
+ return [] unless object.class.respond_to?(:reflect_on_all_associations)
47
+
46
48
  object.class.reflect_on_all_associations
47
49
  .select { |a| a.instance_of? ActiveRecord::Reflection::HasManyReflection }
48
50
  .map(&:name)
@@ -98,7 +98,7 @@ SimpleForm.setup do |config|
98
98
  b.wrapper :form_check_wrapper, class: 'form-check' do |bb|
99
99
  bb.use :input, class: 'form-check-input', error_class: 'is-invalid'
100
100
  bb.use :label, class: 'form-check-label'
101
- bb.use :full_error, wrap_with: { class: 'invalid-feedback' }
101
+ bb.use :error, wrap_with: { class: 'invalid-feedback' }
102
102
  bb.use :hint, wrap_with: { class: 'form-text' }
103
103
  end
104
104
  end
@@ -112,7 +112,7 @@ SimpleForm.setup do |config|
112
112
  ba.use :label_text
113
113
  end
114
114
  b.use :input, class: 'form-check-input', error_class: 'is-invalid'
115
- b.use :full_error, wrap_with: { class: 'invalid-feedback d-block' }
115
+ b.use :error, wrap_with: { class: 'invalid-feedback d-block' }
116
116
  b.use :hint, wrap_with: { class: 'form-text' }
117
117
  end
118
118
 
@@ -125,7 +125,7 @@ SimpleForm.setup do |config|
125
125
  ba.use :label_text
126
126
  end
127
127
  b.use :input, class: 'form-check-input', error_class: 'is-invalid'
128
- b.use :full_error, wrap_with: { class: 'invalid-feedback d-block' }
128
+ b.use :error, wrap_with: { class: 'invalid-feedback d-block' }
129
129
  b.use :hint, wrap_with: { class: 'form-text' }
130
130
  end
131
131
 
@@ -138,7 +138,7 @@ SimpleForm.setup do |config|
138
138
  b.optional :readonly
139
139
  b.use :label, class: 'form-label'
140
140
  b.use :input, class: 'form-control', error_class: 'is-invalid'
141
- b.use :full_error, wrap_with: { class: 'invalid-feedback' }
141
+ b.use :error, wrap_with: { class: 'invalid-feedback' }
142
142
  b.use :hint, wrap_with: { class: 'form-text' }
143
143
  end
144
144
 
@@ -153,7 +153,7 @@ SimpleForm.setup do |config|
153
153
  b.wrapper class: 'd-flex flex-row justify-content-between align-items-center' do |ba|
154
154
  ba.use :input, class: 'form-select mx-1', error_class: 'is-invalid'
155
155
  end
156
- b.use :full_error, wrap_with: { class: 'invalid-feedback d-block' }
156
+ b.use :error, wrap_with: { class: 'invalid-feedback d-block' }
157
157
  b.use :hint, wrap_with: { class: 'form-text' }
158
158
  end
159
159
 
@@ -165,7 +165,7 @@ SimpleForm.setup do |config|
165
165
  b.optional :step
166
166
  b.use :label, class: 'form-label'
167
167
  b.use :input, class: 'form-range', error_class: 'is-invalid'
168
- b.use :full_error, wrap_with: { class: 'invalid-feedback' }
168
+ b.use :error, wrap_with: { class: 'invalid-feedback' }
169
169
  b.use :hint, wrap_with: { class: 'form-text' }
170
170
  end
171
171
 
@@ -183,7 +183,7 @@ SimpleForm.setup do |config|
183
183
  b.use :label, class: 'col-sm-3 col-form-label'
184
184
  b.wrapper :grid_wrapper, class: 'col-sm-9' do |ba|
185
185
  ba.use :input, class: 'form-control', error_class: 'is-invalid'
186
- ba.use :full_error, wrap_with: { class: 'invalid-feedback' }
186
+ ba.use :error, wrap_with: { class: 'invalid-feedback' }
187
187
  ba.use :hint, wrap_with: { class: 'form-text' }
188
188
  end
189
189
  end
@@ -196,7 +196,7 @@ SimpleForm.setup do |config|
196
196
  wr.wrapper :form_check_wrapper, class: 'form-check' do |bb|
197
197
  bb.use :input, class: 'form-check-input', error_class: 'is-invalid'
198
198
  bb.use :label, class: 'form-check-label'
199
- bb.use :full_error, wrap_with: { class: 'invalid-feedback' }
199
+ bb.use :error, wrap_with: { class: 'invalid-feedback' }
200
200
  bb.use :hint, wrap_with: { class: 'form-text' }
201
201
  end
202
202
  end
@@ -210,7 +210,7 @@ SimpleForm.setup do |config|
210
210
  b.use :label, class: 'col-sm-3 col-form-label pt-0'
211
211
  b.wrapper :grid_wrapper, class: 'col-sm-9' do |ba|
212
212
  ba.use :input, class: 'form-check-input', error_class: 'is-invalid'
213
- ba.use :full_error, wrap_with: { class: 'invalid-feedback d-block' }
213
+ ba.use :error, wrap_with: { class: 'invalid-feedback d-block' }
214
214
  ba.use :hint, wrap_with: { class: 'form-text' }
215
215
  end
216
216
  end
@@ -223,7 +223,7 @@ SimpleForm.setup do |config|
223
223
  b.use :label, class: 'col-sm-3 col-form-label pt-0'
224
224
  b.wrapper :grid_wrapper, class: 'col-sm-9' do |ba|
225
225
  ba.use :input, class: 'form-check-input', error_class: 'is-invalid'
226
- ba.use :full_error, wrap_with: { class: 'invalid-feedback d-block' }
226
+ ba.use :error, wrap_with: { class: 'invalid-feedback d-block' }
227
227
  ba.use :hint, wrap_with: { class: 'form-text' }
228
228
  end
229
229
  end
@@ -238,7 +238,7 @@ SimpleForm.setup do |config|
238
238
  b.use :label, class: 'col-sm-3 col-form-label'
239
239
  b.wrapper :grid_wrapper, class: 'col-sm-9' do |ba|
240
240
  ba.use :input, class: 'form-control', error_class: 'is-invalid'
241
- ba.use :full_error, wrap_with: { class: 'invalid-feedback' }
241
+ ba.use :error, wrap_with: { class: 'invalid-feedback' }
242
242
  ba.use :hint, wrap_with: { class: 'form-text' }
243
243
  end
244
244
  end
@@ -250,7 +250,7 @@ SimpleForm.setup do |config|
250
250
  b.use :label, class: 'col-sm-3 col-form-label'
251
251
  b.wrapper :grid_wrapper, class: 'col-sm-9' do |ba|
252
252
  ba.use :input, class: 'form-select', error_class: 'is-invalid'
253
- ba.use :full_error, wrap_with: { class: 'invalid-feedback' }
253
+ ba.use :error, wrap_with: { class: 'invalid-feedback' }
254
254
  ba.use :hint, wrap_with: { class: 'form-text' }
255
255
  end
256
256
  end
@@ -264,7 +264,7 @@ SimpleForm.setup do |config|
264
264
  ba.wrapper class: 'd-flex flex-row justify-content-between align-items-center' do |bb|
265
265
  bb.use :input, class: 'form-select mx-1', error_class: 'is-invalid'
266
266
  end
267
- ba.use :full_error, wrap_with: { class: 'invalid-feedback d-block' }
267
+ ba.use :error, wrap_with: { class: 'invalid-feedback d-block' }
268
268
  ba.use :hint, wrap_with: { class: 'form-text' }
269
269
  end
270
270
  end
@@ -278,7 +278,7 @@ SimpleForm.setup do |config|
278
278
  b.use :label, class: 'col-sm-3 col-form-label pt-0'
279
279
  b.wrapper :grid_wrapper, class: 'col-sm-9' do |ba|
280
280
  ba.use :input, class: 'form-range', error_class: 'is-invalid'
281
- ba.use :full_error, wrap_with: { class: 'invalid-feedback' }
281
+ ba.use :error, wrap_with: { class: 'invalid-feedback' }
282
282
  ba.use :hint, wrap_with: { class: 'form-text' }
283
283
  end
284
284
  end
@@ -322,7 +322,7 @@ SimpleForm.setup do |config|
322
322
  b.wrapper :form_check_wrapper, tag: 'div', class: 'form-check form-switch' do |bb|
323
323
  bb.use :input, class: 'form-check-input', error_class: 'is-invalid'
324
324
  bb.use :label, class: 'form-check-label'
325
- bb.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
325
+ bb.use :error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
326
326
  bb.use :hint, wrap_with: { class: 'form-text' }
327
327
  end
328
328
  end
@@ -342,7 +342,7 @@ SimpleForm.setup do |config|
342
342
  ba.optional :prepend
343
343
  ba.use :input, class: 'form-control', error_class: 'is-invalid'
344
344
  ba.optional :append
345
- ba.use :full_error, wrap_with: { class: 'invalid-feedback' }
345
+ ba.use :error, wrap_with: { class: 'invalid-feedback' }
346
346
  end
347
347
  b.use :hint, wrap_with: { class: 'form-text' }
348
348
  end
@@ -360,7 +360,7 @@ SimpleForm.setup do |config|
360
360
  b.optional :readonly
361
361
  b.use :input, class: 'form-control', error_class: 'is-invalid'
362
362
  b.use :label
363
- b.use :full_error, wrap_with: { class: 'invalid-feedback' }
363
+ b.use :error, wrap_with: { class: 'invalid-feedback' }
364
364
  b.use :hint, wrap_with: { class: 'form-text' }
365
365
  end
366
366
 
@@ -370,7 +370,7 @@ SimpleForm.setup do |config|
370
370
  b.optional :readonly
371
371
  b.use :input, class: 'form-select', error_class: 'is-invalid'
372
372
  b.use :label
373
- b.use :full_error, wrap_with: { class: 'invalid-feedback' }
373
+ b.use :error, wrap_with: { class: 'invalid-feedback' }
374
374
  b.use :hint, wrap_with: { class: 'form-text' }
375
375
  end
376
376
 
@@ -5,7 +5,11 @@ html
5
5
  meta name="viewport" content="width=device-width,initial-scale=1"
6
6
  - if @turbo_no_cache
7
7
  meta name="turbo-cache-control" content="no-cache"
8
+ / El morph no estaría siendo de utilidad
8
9
  / meta name="turbo-refresh-method" content="morph"
10
+
11
+ / En general es deseable el comportamiento scroll "reset", por ejemplo en los forms,
12
+ / ya que los errores se muestran arriba y el botón de submit está abajo
9
13
  / meta name="turbo-refresh-scroll" content="preserve"
10
14
  meta name="turbo-prefetch" content="false"
11
15
  meta name="view-transition" content="same-origin"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.49'
4
+ VERSION = '7.0.8-alpha.50'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.8.pre.alpha.49
4
+ version: 7.0.8.pre.alpha.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-27 00:00:00.000000000 Z
11
+ date: 2024-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails