labelled_form 0.3.3 → 0.3.5

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: 9ec298f96f953aad1ad198a45a75611a7a3a27652fae73aa935975396f9c9d56
4
- data.tar.gz: 2f4960bcaf2112185a3672b16d63a9d624aedad392f69cbc4eeca562e280242a
3
+ metadata.gz: cd24ae5c0afed9586e77ab28bea8b5a15c3abda42fb9058cbc3a74194f31a2af
4
+ data.tar.gz: 023ddb8a925cee69f990e86fb733cdaec2fc37a330bbcde00eefdd342b201d44
5
5
  SHA512:
6
- metadata.gz: cd404ae96eea31826c3d853e6de81a69f07ff5d66c9c50d22642c9ba0232a936fe40658a6b797c2478fb51b2913f62ccfa5d18f19adb5506f5d646e678d4b548
7
- data.tar.gz: bc872bd571500ab766ea0e6eb5573d3f1c7b2b1e116e01df38edfe1c80ae783ea88243d37590f9b3b23d58696b3ed83158ffa3f7aac7dc9c67a30cb8121f1911
6
+ metadata.gz: e3db71397e33591e4478b6b484f06bcbff175c687bc86a2bc627b832dfc655ec3014f8e15421d6b38aa0bdb6e75a3d60274dd07367007fffb494874fb4ac10e8
7
+ data.tar.gz: 81031dd90d3714ac8cf3e948d0fc753d3dd57b20f752ce2dff395d88b417660466e095c5cf8e25d856943f60dc6b46b806135dbde86f82b0eace0577241d1d2a
@@ -1,3 +1,3 @@
1
1
  module LabelledForm
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.5"
3
3
  end
data/lib/labelled_form.rb CHANGED
@@ -14,8 +14,8 @@ module LabelledForm
14
14
  label_text = options.delete(:label) || label_class.present? || label_with_colon
15
15
 
16
16
  label_text = method.to_s.humanize if label_text === true
17
- label_text&.sub!(/_id$/,"")
18
- label_text << ":" if label_with_colon && !label_text.ends_with?(":")
17
+ label_text = label_text&.sub(/_id$/,"")
18
+ label_text += ":" if label_with_colon && !label_text.ends_with?(":")
19
19
 
20
20
  field_html = yield
21
21
 
@@ -63,6 +63,12 @@ module LabelledForm
63
63
  end
64
64
  end
65
65
 
66
+ def password_field method, options = {}
67
+ with_label(method, options) do
68
+ super
69
+ end
70
+ end
71
+
66
72
  def text_field method, options = {}
67
73
  with_label(method, options) do
68
74
  super
@@ -95,6 +101,12 @@ module LabelledForm
95
101
  end
96
102
  end
97
103
 
104
+ def range_field method, options = {}
105
+ with_label(method, options) do
106
+ super
107
+ end
108
+ end
109
+
98
110
  def radio_button(method, tag_value, options = {})
99
111
  options = options.dup
100
112
  label_text = options.delete(:label)
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.3.3
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-20 00:00:00.000000000 Z
11
+ date: 2025-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview