bullet_train 1.7.21 → 1.7.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/locales/en/base.yml +3 -3
- data/docs/field-partials/super-select.md +2 -35
- data/docs/super-scaffolding/options.md +1 -1
- data/lib/bullet_train/version.rb +1 -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: f862701bd33288070a27c6cb4d129e83adc37664b3afd632341b92c7b88deba4
|
4
|
+
data.tar.gz: 59900a35f5547563b17af1efa3e0111210f1e5c22ffac57cfaf9faf703359239
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55086ab8f8f0bfa8fd5c37958c91d27dc7b79d2d74fd219bdb10026697302f4a2c9e3a7b7de601226fc02ad8285b9fc391ba43319a45f1af5e182ae8fd821a8e
|
7
|
+
data.tar.gz: b3210f854f1fde2c2277c6ae30fa10e0900963b13e647e9d7835b4cd0038695c9492c1ec9f46677a49e6bd6ad2bb15edf41ff956d9326c1a39af14d7181efb69
|
data/config/locales/en/base.yml
CHANGED
@@ -84,9 +84,9 @@ en:
|
|
84
84
|
date_and_time: '%m/%d/%Y %l:%M %p'
|
85
85
|
file_fields:
|
86
86
|
download: Download File
|
87
|
-
download_current: Download Current
|
88
|
-
remove: Remove Current
|
89
|
-
upload: Upload New
|
87
|
+
download_current: Download Current File
|
88
|
+
remove: Remove Current File
|
89
|
+
upload: Upload New File
|
90
90
|
bulk_select:
|
91
91
|
all: All
|
92
92
|
|
@@ -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
|
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
|
137
|
-
|
138
|
-
<pre><code><div data-controller="dependent-form-fields">
|
139
|
-
<div data-action="$change->dependent-form-fields#updateDependentFields">
|
140
|
-
<%= render 'shared/fields/super_select', form: form, method: :category_id,
|
141
|
-
choices: Category.all.map { |category| [category.label_string, category.id] } %>
|
142
|
-
</div>
|
143
|
-
<div>
|
144
|
-
<!-- This is the dependent field that would get updated when the previous one changes -->
|
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
|
-
</div>
|
149
|
-
</div></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
|
@@ -11,7 +11,7 @@ Most of these include skipping particular functionalities, so take a look at wha
|
|
11
11
|
|--------|-------------|
|
12
12
|
| `--sortable` | [Details here](/docs/super-scaffolding/sortable.md) |
|
13
13
|
| `--namespace=customers` | [Details here](/docs/namespacing.md) |
|
14
|
-
| `--
|
14
|
+
| `--navbar="ti-world"` | Pass the Themify icon or Font Awesome icon of your choice to automatically add it to the navbar* |
|
15
15
|
| `--only-index` | Only scaffold the index view for a model"` |
|
16
16
|
| `--skip-views` | |
|
17
17
|
| `--skip-form` | |
|
data/lib/bullet_train/version.rb
CHANGED
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.
|
4
|
+
version: 1.7.23
|
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-
|
11
|
+
date: 2024-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|