ariadne_view_components 0.0.30-x86_64-darwin → 0.0.31-x86_64-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: 3b33897e21d26f90abad1ad1f8aa013368540f994916344412e06d983edb4fdd
4
- data.tar.gz: 5fb30834de37878d88cf5b285e4a18dcc6968d342beb0e45b59ce742e968a48f
3
+ metadata.gz: 1e3498a955a793535b994a8e36329b795130571a4eb3f774eb4a865eda97c69c
4
+ data.tar.gz: 8c89d94949d4be7d3d7f50fbd2ee360c2f74e448db37c2262f9ca95a8886099a
5
5
  SHA512:
6
- metadata.gz: 62617cb4024d2aa585b651f7c542adef1c38313854152a6349542911c5519612943a3e397629b53207fddf89ebf26504e8d9815143680b043c65396962c5c9ca
7
- data.tar.gz: 0eea38644046d935b0f833af833f72a4558c47ea499cd7ef2400e618999e2e0a65eee5986de1d452e7c4fde65c83de20de4ed650ae5ef5d9944d058f9a2bb321
6
+ metadata.gz: 715439b447e86ea43fcc531c245ab5f57a3a579374177e44f5ef75b239eb3b86e18bf1ec2db91ad541e59bd30ea3c14c8456820dd5f3c743eae0a447e4958a2a
7
+ data.tar.gz: 99cdd35891fd64ae3bcff04d82c09098c2817cdbda4afc62ac9a7ed8155bd0eab897d6a8fa2eea1b12f2d06245356dbfddad480edb596aebc1a20ce50abf1998
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: x86_64-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