ariadne_view_components 0.0.30-arm64-darwin → 0.0.31-arm64-darwin

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: c315620f90a40661bc798120436dca525a9345aaaf57ff24a9b53458fe26c910
4
- data.tar.gz: a9ee01f3e7d2865f20353166fa5452c4d7a0a840c5a0d338afd5527d6d71bb7b
3
+ metadata.gz: d5d0063fecde0f334e503cacec23b568df2e36b60d3c48c6a469566269345aef
4
+ data.tar.gz: decfd410c31fca377f53e28a3478fb581239a739dcb644066ffd51d3a5cbf63f
5
5
  SHA512:
6
- metadata.gz: e4c2eade147211bae2d96532ae3da6977215e810ccb26338708f4727f53db704707f8ed71e18aad07bc8550919d388e6528107c6b9e04467b6b954e00219f9f5
7
- data.tar.gz: a5ae882c4d8f665e851e138becf4415695b19c8cd0299bed6058cc50e10ac6b0f19673806e9abf77df8cf2b1b2f2a3b11a46fe12396b686c5b69f2b56ae0cd36
6
+ metadata.gz: 18d74ca65e7e5728ce38f28ddbab9105a478c964a0c6b4562d918dae77b9b7f6d95a388f4438d1f6667f43be09ad46f5137956d9622c725952ceb0d1dba65981
7
+ data.tar.gz: d17888d419969f807e83000f5bd6a58a6a2a432bfe5f5978d5ff6df333a36fdb7ccd00156a8271a4e680f754432d90b66f20f62318d0bbf67a79a67993bc8d62
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.0.31](https://github.com/yettoapp/ariadne/tree/v0.0.31) (2023-03-21)
4
+
5
+ [Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.30...v0.0.31)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Fix form attrs [\#172](https://github.com/yettoapp/ariadne/pull/172) ([gjtorikian](https://github.com/gjtorikian))
10
+
3
11
  ## [v0.0.30](https://github.com/yettoapp/ariadne/tree/v0.0.30) (2023-03-08)
4
12
 
5
13
  [Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.29...v0.0.30)
@@ -10,26 +10,16 @@ module Ariadne
10
10
  def ariadne_form_with(model: nil, scope: nil, url: nil, format: nil, classes: "", attributes: {}, **options, &block)
11
11
  options[:class] = class_names(DEFAULT_FORM_CLASSES, options[:class])
12
12
  options[:builder] ||= Ariadne::FormBuilder
13
- options[:html] ||= {}
13
+ options[:html] = attributes
14
14
 
15
- data = options.delete(:data) || {}
16
- attributes = attributes.delete_if do |key, value|
17
- key_name = key.to_s
18
- if key_name.start_with?("data-")
19
- data[key_name.sub(/^data-/, "").to_sym] = value
20
- true
21
- else
22
- false
23
- end
24
- end
25
-
26
- data[:controller] = if data.fetch(:controller, {}).present?
27
- "#{data[:controller]} ariadne-form"
15
+ data_controller = options[:html].fetch(:"data-controller", "")
16
+ options[:html][:"data-controller"] = if data_controller.present?
17
+ "#{data_controller} ariadne-form"
28
18
  else
29
19
  "ariadne-form"
30
20
  end
31
21
 
32
- form_with(model: model, scope: scope, url: url, format: format, data: data, attributes: attributes, **options, &block)
22
+ form_with(model: model, scope: scope, url: url, format: format, **options, &block)
33
23
  end
34
24
  end
35
25
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ariadne
4
4
  module ViewComponents
5
- VERSION = "0.0.30"
5
+ VERSION = "0.0.31"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ariadne_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.30
4
+ version: 0.0.31
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Garen J. Torikian
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-08 00:00:00.000000000 Z
11
+ date: 2023-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tailwind_merge