pxs-forms 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -1
- data/lib/pxs/forms/model_form_builder.rb +2 -1
- data/lib/pxs/forms/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 981f2859bcb9b331063ac4dae5aaba3c95265e783b07b8d37b39599aaba639ed
|
4
|
+
data.tar.gz: 81befc04467b8c087dc4aad8617d6008686fb812be54c4cbc1ebce7e582ce3bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcfe9e12c264106324a7f83c149783a734d2236165461e808e0885f83cb2c7de63c010240e50b064e7248adf2da1a2e12fcdc2972d67d366d7d7c23ad1a0e4c8
|
7
|
+
data.tar.gz: 30aec3cb45e6393b39f96a3fe9f3bb5ea342ceb784d4a76b94ce837edbd908b3a6a6972cdc8613f8ecddb13f19205960cfa01ebf4e2a876db571d97cfa17282f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
# pxs-forms
|
2
|
+
|
3
|
+
## Unofficial Release
|
4
|
+
|
5
|
+
## [0.1.2] - 2025-03-09
|
6
|
+
|
7
|
+
- Fix Multiple Selects not selecting the correct values
|
8
|
+
|
9
|
+
## [0.1.1] - 2025-03-08
|
10
|
+
|
11
|
+
- Fix a bug where empty values are ignored when explicitly specified
|
12
|
+
|
13
|
+
## [0.1.0]
|
14
|
+
|
15
|
+
- Mostly bug-free release, testing needs to be done
|
16
|
+
|
1
17
|
## [Unreleased]
|
2
18
|
|
3
19
|
## [0.0.1] - 2024-03-20
|
@@ -16,4 +32,4 @@
|
|
16
32
|
- Use base input names and IDs in model form builder
|
17
33
|
- Add select or create subform as a model form builder method
|
18
34
|
- Add nested association form and related methods to models helper
|
19
|
-
- Add shorthand methods: model_form_for,
|
35
|
+
- Add shorthand methods: model_form_for, model_form_wit
|
@@ -241,10 +241,11 @@ class ModelFormBuilder < ActionView::Helpers::FormBuilder
|
|
241
241
|
input_options = options || {}
|
242
242
|
|
243
243
|
multiple = input_options[:multiple]
|
244
|
+
selected = if object.respond_to? attribute then object.send(attribute) else object[attribute] end
|
244
245
|
|
245
246
|
safe_join [
|
246
247
|
collection_input(attribute, options) do
|
247
|
-
@template.collection_select(object.class.model_name.singular.to_sym, attribute, options[:collection], value_method, text_method, {selected:
|
248
|
+
@template.collection_select(object.class.model_name.singular.to_sym, attribute, options[:collection], value_method, text_method, {selected:}.merge(options[:select] || {}), merge_input_options({class: "#{"custom-select" unless multiple} #{"is-invalid" if has_error?(attribute)}"}, options[:input_html]))
|
248
249
|
end
|
249
250
|
]
|
250
251
|
end
|
data/lib/pxs/forms/version.rb
CHANGED