tramway 2.2.3 → 2.2.3.1

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: 073b1293c7f3778243b4402bd9db528eea16b9897145f5ac7a50bb0751607dfd
4
- data.tar.gz: 980e71accc0572795aaa87764af580f50d883fa504b4b148fd5224826941c110
3
+ metadata.gz: c3404f527f0941b117509108d7827d36cdf2c2d80037bdd41d6316ad040c2b95
4
+ data.tar.gz: 5a2896ae1e85140de75fa5c8b7aabc50475adf6ce31edeee66cfb1dd2d9cb034
5
5
  SHA512:
6
- metadata.gz: 4819641881ea15d5ef0211470aab28fad0c758ac2f733bab1c8b2a319ae0b4794973df321a45d0bc054c273c9d567db1c86325a9b2739e40a818b101106c9b3a
7
- data.tar.gz: 331ddb0387c6ee4339e1988a69c79cb9851d5f33f2ccd519036dec9d88c5b8d7fcd3744418e881550c915f568a6efb8fe352c4e80d0a08eb79b3833469221662
6
+ metadata.gz: 11325a08313cf4eea578d73e5471b38339837f2f28b5af7e72a01d1eac6b72a493b12058135b8bd2f024608626ff9d84643c5d4d173c8b7fd561e41da2bd358c
7
+ data.tar.gz: bbd34d3d7fe3f8a7b306a7d79b0c8a328968180a270db57b2c89c490d5a115b68ee534ea75be48c39d60da13b45402288a6a6ea6b72f0db57d7c17a6d293d88a
@@ -13,7 +13,7 @@
13
13
  = link_to path, class: classes, **render_options do
14
14
  = content
15
15
  - when :button
16
- %button{ type: :submit, name: :commit, class: classes, **render_options }
16
+ %button{ class: classes, **render_options }
17
17
  = content
18
18
  - when :form
19
19
  = helpers.button_to path, method:, class: classes, form: form_options, **render_options do
@@ -16,7 +16,7 @@ module Tailwinds
16
16
 
17
17
  def before_render
18
18
  return if tag.present?
19
- return @tag = :button if type == :submit
19
+ return @tag = :button if options[:type] == :submit
20
20
 
21
21
  URI.parse(path)
22
22
 
@@ -5,6 +5,7 @@ require 'tramway/utils/field'
5
5
  module Tailwinds
6
6
  module Form
7
7
  # Provides Tailwind-styled forms
8
+ # rubocop:disable Metrics/ClassLength
8
9
  class Builder < Tramway::Views::FormBuilder
9
10
  include Tramway::Utils::Field
10
11
 
@@ -92,7 +93,14 @@ module Tailwinds
92
93
  def submit(action, **options, &)
93
94
  sanitized_options = sanitize_options(options)
94
95
 
95
- render(Tailwinds::ButtonComponent.new(text: action, size: form_size, type: :submit, **sanitized_options), &)
96
+ render(
97
+ Tailwinds::ButtonComponent.new(
98
+ text: action,
99
+ size: form_size,
100
+ options: sanitized_options.merge(name: :commit, type: :submit)
101
+ ),
102
+ &
103
+ )
96
104
  end
97
105
 
98
106
  private
@@ -140,5 +148,6 @@ module Tailwinds
140
148
  end
141
149
  end
142
150
  end
151
+ # rubocop:enable Metrics/ClassLength
143
152
  end
144
153
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tramway
4
- VERSION = '2.2.3'
4
+ VERSION = '2.2.3.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kalashnikovisme