bullet_train 1.7.20 → 1.7.22

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: a0938e72d54cee53af1f66a9447a1f2f2d78b7359f08a3cfa02fabb99db7c50f
4
- data.tar.gz: 6faee1f6d9a7645712e3c8ef2c63b2da939a2730dccb23ead8d70e9d47b648b7
3
+ metadata.gz: ec504a7d2f778a870c7d53c43dd91a003d3e4894afbfe1932394a1446d0807a1
4
+ data.tar.gz: 94beb6da6f09888bdc2cd7c7242bc44c5688e990eacc86727bdc7a789e4ab7fd
5
5
  SHA512:
6
- metadata.gz: f8da94a8984e5c580ccb059b7ddf8a630f7da3802494d53a6693da1f720f060bd44af24a58f6d3258e83485f67a53812ae847f9bfa78b640fd7c091d2dffdd3d
7
- data.tar.gz: b08bfe4c81049cdcf91305585c7055db167486801249d784c828a8e75ef04fc7f3a24ae0dc415b28c932adda923427200213bab3f6a878f1d946a8a91021521a
6
+ metadata.gz: 8a69dc93c17f930524870ab8edd32fc33d4ea599f8713f6025822bfae31028e16f824da825a0f91ccec51666adcfee511913d2d5d859c4f24a0f998549049817
7
+ data.tar.gz: 9a01f31d8c0104a66b11a384af0ebacd080ff41c60ac37a96776230ab6c8e8c9d990a20eb1a4e0cfd3a4bca58022798b89f7008e6c4d678f038fad8182bc593d
@@ -1,4 +1,4 @@
1
- Note: before you attempt to manually wire up a `super_select` field, note that Super Scaffolding will automatically do that for your models. See [Super Scaffolding](/docs/super-scaffolding.md) docs, section 4, for an example. And make sure Super Scaffolding doesn't automatically do what you're trying to do.
1
+ Note: before you attempt to manually wire up a `super_select` field, note that Super Scaffolding will automatically do that for your models. See [Super Scaffolding](/docs/super-scaffolding.md), docs, section 5, for an example. And make sure Super Scaffolding doesn't automatically do what you're trying to do.
2
2
 
3
3
  # Examples for the `super_select` Field Partial
4
4
 
@@ -133,40 +133,7 @@ All events dispatched from the `super_select` partial are [Select2's jQuery even
133
133
  | select2:clearing | $select2:clearing |
134
134
  | select2:clear | $select2:clear |
135
135
 
136
- For example, the view template for catching the `$change` events in a parent `dependent-form-fields` using a Stimulus controller with a single `updateDependentFields` method would look like this:
137
-
138
- <pre><code>&lt;div data-controller="dependent-form-fields"&gt;
139
- &lt;div data-action="$change->dependent-form-fields#updateDependentFields"&gt;
140
- <%= render 'shared/fields/super_select', form: form, method: :category_id,
141
- choices: Category.all.map { |category| [category.label_string, category.id] } %>
142
- &lt;/div&gt;
143
- &lt;div&gt;
144
- &lt;!-- This is the dependent field that would get updated when the previous one changes --&gt;
145
- <%= render 'shared/fields/super_select', form: form, method: :category_id,
146
- choices: Category.all.map { |category| [category.label_string, category.id] },
147
- html_options: { data: { 'dependent-form-fields-target': 'dependentField' }} %>
148
- &lt;/div&gt;
149
- &lt;/div&gt;</code></pre>
150
-
151
- And this is an example of what the `dependent-form-fields` Stimulus controller would look like.
152
-
153
- <pre><code>
154
- // dependent_form_fields_controller.js
155
- import { Controller } from "stimulus"
156
-
157
- export default class extends Controller {
158
- static targets = [ "dependentField" ]
159
-
160
- updateDependentFields(event) {
161
- const originalSelect2Event = event.detail.event
162
- console.log(`catching event ${event.type}`, originalSelect2Event)
163
-
164
- this.dependentFieldTargets.forEach((dependentField) => {
165
- // update dependentField based on value found in originalSelect2Event.target.value
166
- })
167
- }
168
- }
169
- </code></pre>
136
+ For an example of catching the `$change` event to update a dependent field, look at the [Dynamic Forms and Dependent Fields](/docs/field-partials/dynamic-forms-dependent-fields.md) doc.
170
137
 
171
138
  [select2]: https://select2.org
172
139
  [select2_events]: https://select2.org/programmatic-control/events
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.7.20"
2
+ VERSION = "1.7.22"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.20
4
+ version: 1.7.22
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-23 00:00:00.000000000 Z
11
+ date: 2024-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -448,16 +448,16 @@ dependencies:
448
448
  name: pagy
449
449
  requirement: !ruby/object:Gem::Requirement
450
450
  requirements:
451
- - - ">="
451
+ - - "<"
452
452
  - !ruby/object:Gem::Version
453
- version: '0'
453
+ version: '7'
454
454
  type: :runtime
455
455
  prerelease: false
456
456
  version_requirements: !ruby/object:Gem::Requirement
457
457
  requirements:
458
- - - ">="
458
+ - - "<"
459
459
  - !ruby/object:Gem::Version
460
- version: '0'
460
+ version: '7'
461
461
  - !ruby/object:Gem::Dependency
462
462
  name: pry
463
463
  requirement: !ruby/object:Gem::Requirement