labelled_form 0.2.3 → 0.2.4

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: 38262f7dcfe077ea7678b0f28e01a3baacb4bf0e1fed446f3c87ab3b07803b6e
4
- data.tar.gz: e03071200fdf6bf0858f08cc7d7f0bc45d273dc9070245dc356973327252bcc0
3
+ metadata.gz: 2b58e84e22bb1f12df2f02c2e136989e5be00ecb3eba4581f677d52f021fc471
4
+ data.tar.gz: acb13a7a2520c75ced8bcaaef5f391e3360c7120ca22c65b89b8b0594030a3c8
5
5
  SHA512:
6
- metadata.gz: 4566ed311aad19b51a3ced101f045c56ada1c66c5753b961841418e81385e81058318fe216bf08fd64731e7530b7588ff6ac1bd760991cd40697f22eb3d13f64
7
- data.tar.gz: 2b28af8ff3b88b78d960f55dafab2ae882e3973ff45b82db99d4355635587627eaad96e88071564da1dd76a23af5ed58cc00d05ea3a04be70da29663d5f00f27
6
+ metadata.gz: f46c9d747077fab1a02e9d578d823bb2d65c4630c128d68692f6127731053bceab8b7cc41a015711a0f79a70cbaff88bcab4aad34897a483f833508b3eaed483
7
+ data.tar.gz: fc2498ec4eaca65425d8911b6c3676df43504c734685df7b090d1d336d29b5bf784f5935031b725d5c1cda88eabd22d2defa4e0635dd45a29d9035dfa96590b8
@@ -1,3 +1,3 @@
1
1
  module LabelledForm
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
data/lib/labelled_form.rb CHANGED
@@ -10,6 +10,7 @@ module LabelledForm
10
10
 
11
11
  class Builder < ActionView::Helpers::FormBuilder
12
12
  def text_area method, options = {}
13
+ options = options.dup
13
14
  if label_text = options.delete(:label)
14
15
  label_text = method.to_s.humanize if label_text === true
15
16
  label(method, label_text) + " ".html_safe + super
@@ -19,6 +20,7 @@ module LabelledForm
19
20
  end
20
21
 
21
22
  def date_field method, options = {}
23
+ options = options.dup
22
24
  if label_text = options.delete(:label)
23
25
  label_text = method.to_s.humanize if label_text === true
24
26
  label(method, label_text) + " ".html_safe + super
@@ -28,6 +30,7 @@ module LabelledForm
28
30
  end
29
31
 
30
32
  def email_field method, options = {}
33
+ options = options.dup
31
34
  if label_text = options.delete(:label)
32
35
  label_text = method.to_s.humanize if label_text === true
33
36
  label(method, label_text) + " ".html_safe + super
@@ -37,6 +40,7 @@ module LabelledForm
37
40
  end
38
41
 
39
42
  def text_field method, options = {}
43
+ options = options.dup
40
44
  if label_text = options.delete(:label)
41
45
  label_text = method.to_s.humanize if label_text === true
42
46
  label(method, label_text) + " ".html_safe + super
@@ -46,6 +50,7 @@ module LabelledForm
46
50
  end
47
51
 
48
52
  def file_field method, options = {}
53
+ options = options.dup
49
54
  if label_text = options.delete(:label)
50
55
  label_text = method.to_s.humanize if label_text === true
51
56
  label(method, label_text) + " ".html_safe + super
@@ -55,6 +60,7 @@ module LabelledForm
55
60
  end
56
61
 
57
62
  def radio_button(method, tag_value, options = {})
63
+ options = options.dup
58
64
  label_text = options.delete(:label)
59
65
  super.tap do |out|
60
66
  if label_text
@@ -66,6 +72,7 @@ module LabelledForm
66
72
  end
67
73
 
68
74
  def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
75
+ options = options.dup
69
76
  label_text = options.delete(:label)
70
77
  super.tap do |out|
71
78
  if label_text
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: labelled_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-20 00:00:00.000000000 Z
11
+ date: 2022-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
- rubygems_version: 3.0.3
107
+ rubygems_version: 3.2.3
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Adds label option to Rails form helpers