chobble-forms 0.5.5 → 0.5.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b92fb8d1150671025f0475b802e6484f337b554b072c1cd8464eb721e83df397
4
- data.tar.gz: 1fa3020e94941bb44a3abb8fed8117939e236dfa3da8eb118bf86fcf4f37b718
3
+ metadata.gz: 38897550927a4c901cada28fbe5f63e8447bf108e6eb3bedf5d045807e45c245
4
+ data.tar.gz: ede19464d42338a4834967dda6a1df1048d2bef39599ddd89e079256c796ec15
5
5
  SHA512:
6
- metadata.gz: d198ecfde80af5079d2b137d3977e3d53691e79c97ba118d17e6474291092e7e38788c376a10c750b60a72b6494720513430568cce0803d0087ae24221cc1519
7
- data.tar.gz: ac1658d4113f8970f5859837231567affeb0c790de34cc7afb98cf1cbbc7c9eea0de83cb0634d65b05e22c31f3cf716a0b3eca27242703081cc294d2f0e41cf3
6
+ metadata.gz: c24eca1ed04bf5d7cbbe7d483451368ef3b636d3d0d42018e967a5f22ddbee88e4c7c8d2c5a7f6f104828af570610d395342bb05fad838c5366f4b84edd186db
7
+ data.tar.gz: b486d795a2b856e0895b4736901f52fede072e35319acb7511aaef5b007919e8af5ea644365c34ef30839f0f36301a247fe0b791a5a12c98318ebdd078c11649
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module ChobbleForms
5
- VERSION = "0.5.5"
5
+ VERSION = "0.5.6"
6
6
  end
@@ -0,0 +1,22 @@
1
+ <%
2
+ # Generic Turbo response partial for any form field
3
+ # Required parameters:
4
+ # model: The model object
5
+ # field: The field name
6
+ # partial: The field partial to render (e.g., 'number', 'text_field', etc.)
7
+ # i18n_base: The i18n base path
8
+ # Optional parameters:
9
+ # attributes: Hash of additional attributes to pass to the field partial
10
+
11
+ model = local_assigns[:model]
12
+ field = local_assigns[:field]
13
+ partial = local_assigns[:partial]
14
+ i18n_base = local_assigns[:i18n_base]
15
+ attributes = local_assigns[:attributes] || {}
16
+ %>
17
+
18
+ <%= fields model: model, skip_default_ids: false do |form| %>
19
+ <% @_current_form = form %>
20
+ <% @_current_i18n_base = i18n_base %>
21
+ <%= render "chobble_forms/#{partial}", field: field, **attributes %>
22
+ <% end %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chobble-forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chobble.com
@@ -182,6 +182,7 @@ files:
182
182
  - views/chobble_forms/_decimal_comment.html.erb
183
183
  - views/chobble_forms/_display_field.html.erb
184
184
  - views/chobble_forms/_errors.html.erb
185
+ - views/chobble_forms/_field_turbo_response.html.erb
185
186
  - views/chobble_forms/_field_with_link.html.erb
186
187
  - views/chobble_forms/_fields.html.erb
187
188
  - views/chobble_forms/_fieldset.html.erb