superform 0.4.4 → 0.4.5

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: 2db21420ecfac1a9133026933f8b05a9a7512bbc35c60ebf605abe88eda05d5b
4
- data.tar.gz: 33761bcb89952fc6926f4ef798bb3c6665d2b4ce4528b7f451e58a103f9014bb
3
+ metadata.gz: f08aba5c447c430ce4e06c86dacf7a6bc97cf95fd7ce379e913498fe3e809ab7
4
+ data.tar.gz: ce49b9e40f9f7ff9cc4bd2260918af3c16fa8689c3718281077170b9532613e1
5
5
  SHA512:
6
- metadata.gz: 77158970877d1a26538636bb30a4c1949c35d69058e0576bed151f3fb3aa18bc7503a2a1ed6ee7651cc28bdf29244f74a3e15197fe4599cdde4096da8cfb1c90
7
- data.tar.gz: 6edc1b33b36048b6d3be87eb860b4b7e96595bcda869fa57e5dad390a18e2f8bf7498b75fd46449ce156a85d3f15c606be2856ae725edfa0a1444ddb1915591d
6
+ metadata.gz: a392d567cba45cf0215131d00ef2557c4989cf020ded8d88f43c6d98c410ae743a629f322fab86addaa0980667a1af335a0effe318bd3d01adbeafcd1c543d5b
7
+ data.tar.gz: e7d2b01c137cefa7e0e6cefda057005af5f4e297e1e26b36be96f1c1276b0854ccd0352217d30efce471a7c08f1dda2ed5e024e9193321ebae922a9d32f04829
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- superform (0.4.4)
4
+ superform (0.4.5)
5
5
  phlex-rails (~> 1.0)
6
6
  zeitwerk (~> 2.6)
7
7
 
data/README.md CHANGED
@@ -157,7 +157,7 @@ class SignupForm < ApplicationForm
157
157
 
158
158
  div do
159
159
  render field(:agreement).label { "Check this box if you agree to give us your first born child" }
160
- render field(:agreement).input(type: :checkbox, value: true)
160
+ render field(:agreement).checkbox(checked: true)
161
161
  end
162
162
 
163
163
  render button { "Submit" }
@@ -254,11 +254,12 @@ module Superform
254
254
  # Rails has a hidden and checkbox input to deal with sending back a value
255
255
  # to the server regardless of if the input is checked or not.
256
256
  input(name: dom.name, type: :hidden, value: "0")
257
- input(**attributes)
257
+ # The hard coded keys need to be in here so the user can't overrite them.
258
+ input(type: :checkbox, value: "1", **attributes)
258
259
  end
259
260
 
260
261
  def field_attributes
261
- { id: dom.id, name: dom.name, value: "1", checked: field.value, type: :checkbox }
262
+ { id: dom.id, name: dom.name, checked: field.value }
262
263
  end
263
264
  end
264
265
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Superform
4
- VERSION = "0.4.4"
4
+ VERSION = "0.4.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Gessler