kelredd-useful 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/useful/erb_helpers/proper.rb +12 -2
- data/lib/useful/version.rb +1 -1
- metadata +6 -8
@@ -37,10 +37,20 @@ module Useful::ErbHelpers::Proper
|
|
37
37
|
unchecked_value = options.delete(:unchecked_value)
|
38
38
|
unchecked_value = '0' if unchecked_value.nil?
|
39
39
|
disable_unchecked_value = options.delete(:disable_unchecked_value)
|
40
|
+
# ''.tap do |html|
|
41
|
+
# html << input_tag(:hidden, name, unchecked_value, :id => "#{options[:id]}_hidden") unless disable_unchecked_value.is_true?
|
42
|
+
# html << input_tag(:checkbox, name, value, options)
|
43
|
+
# html << tag(:label, :for => options[:id]) { label_text } unless label_text.blank?
|
44
|
+
# end
|
40
45
|
''.tap do |html|
|
41
46
|
html << input_tag(:hidden, name, unchecked_value, :id => "#{options[:id]}_hidden") unless disable_unchecked_value.is_true?
|
42
|
-
html <<
|
43
|
-
|
47
|
+
html << if label_text.blank?
|
48
|
+
input_tag(:checkbox, name, value, options)
|
49
|
+
else
|
50
|
+
tag(:label, :for => options[:id]) do
|
51
|
+
input_tag(:checkbox, name, value, options) + label_text
|
52
|
+
end
|
53
|
+
end
|
44
54
|
end
|
45
55
|
end
|
46
56
|
|
data/lib/useful/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kelredd-useful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 11
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 2
|
10
|
+
version: 0.4.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kelly Redding
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2011-06-23 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: shoulda
|
@@ -130,7 +129,6 @@ files:
|
|
130
129
|
- lib/useful/shoulda_macros/test_unit.rb
|
131
130
|
- lib/useful/version.rb
|
132
131
|
- lib/useful.rb
|
133
|
-
has_rdoc: true
|
134
132
|
homepage: http://code.kelredd.com
|
135
133
|
licenses: []
|
136
134
|
|
@@ -161,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
159
|
requirements: []
|
162
160
|
|
163
161
|
rubyforge_project:
|
164
|
-
rubygems_version: 1.
|
162
|
+
rubygems_version: 1.7.2
|
165
163
|
signing_key:
|
166
164
|
specification_version: 3
|
167
165
|
summary: A collection of useful helpers for various ruby things.
|