superform 0.4.1 → 0.4.3

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: 5daa39c7a090d229f2175c5214e69ae17c586738ff7b64c9c8c4d7745f52e08f
4
- data.tar.gz: 7d5b2fa66f1230f5f7efdbdc2a97fef97fb1ad5c069dc1331a685cfd4cee474b
3
+ metadata.gz: f0023768360f3864f5d40be3db143795445ab5f31aca7d166fd09294deaa8f1e
4
+ data.tar.gz: 5a611e254153c2d32705302220581c41b376db5c7eb4eab289049a1cfe654e81
5
5
  SHA512:
6
- metadata.gz: f8b014e3dceb150d9e17e294794370a967f8bec8630a37219e20c3fbb3d4fbdac89dbd5a4beb91829f4c3e74155d607fee303e71600f16d6d5a8cbb3c100ebc1
7
- data.tar.gz: debd7cf51bdea3de105412ceece2bea44f074acb713eeffc786ca1f6c56e7323f54cec2b8a12b8b36172e3c3b4b74a071738d2978bee5e15a63bf36692f7dde7
6
+ metadata.gz: 7392079da126e3a623ba0dc95e52872c1a04f2995ac2236100ae93f33f8470ed336140449e83e19c294ab8024ed56a8ee9a85f5f0ed9018901cc7dd12cb05e7f
7
+ data.tar.gz: 633cdeb0536d1a44bdd4943ef71e88f5acc13d6555a28f2bc026cabf44318f925eda333218c2591a42ffca26b8f49602f2fe8f4dea94332295f9f261b11980e2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- superform (0.4.1)
4
+ superform (0.4.2)
5
5
  phlex-rails (~> 1.0)
6
6
  zeitwerk (~> 2.6)
7
7
 
@@ -71,10 +71,11 @@ module Superform
71
71
  end
72
72
  end
73
73
 
74
- def initialize(model, action: nil, method: nil)
74
+ def initialize(model, action: nil, method: nil, **attributes)
75
75
  @model = model
76
76
  @action = action
77
77
  @method = method
78
+ @attributes = attributes
78
79
  @namespace = Namespace.root(model.model_name.param_key, object: model, field_class: self.class::Field)
79
80
  end
80
81
 
@@ -87,7 +88,7 @@ module Superform
87
88
  end
88
89
 
89
90
  def form_tag(&)
90
- form action: form_action, method: form_method, &
91
+ form action: form_action, method: form_method, **@attributes, &
91
92
  end
92
93
 
93
94
  def template(&block)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Superform
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.3"
5
5
  end
data/lib/superform.rb CHANGED
@@ -188,8 +188,8 @@ module Superform
188
188
 
189
189
  # Checks if the child exists. If it does then it returns that. If it doesn't, it will
190
190
  # build the child.
191
- def create_child(key, child_class, **, &)
192
- @children.fetch(key) { @children[key] = child_class.new(key, parent: self, **, &) }
191
+ def create_child(key, child_class, **kwargs, &block)
192
+ @children.fetch(key) { @children[key] = child_class.new(key, parent: self, **kwargs, &block) }
193
193
  end
194
194
  end
195
195
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Gessler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-16 00:00:00.000000000 Z
11
+ date: 2023-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phlex-rails
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
- rubygems_version: 3.4.6
87
+ rubygems_version: 3.5.3
88
88
  signing_key:
89
89
  specification_version: 4
90
90
  summary: Build forms in Rails