lrd_view_tools 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/app/helpers/lrd_form_helper.rb +4 -3
- metadata +5 -5
@@ -30,11 +30,12 @@ module LRD
|
|
30
30
|
divclass = labeled_input_divclass(options)
|
31
31
|
comment = comment_for_labeled_input(options.delete(:comment))
|
32
32
|
if block_given?
|
33
|
-
input =
|
33
|
+
input = capture(&block)
|
34
34
|
else
|
35
35
|
input = input_for_labeled_input(object_name, method, options)
|
36
36
|
end
|
37
37
|
|
38
|
+
|
38
39
|
if object_name.blank? or method.blank?
|
39
40
|
label = "<label> </label>".html_safe
|
40
41
|
elsif text = options.delete(:text)
|
@@ -139,8 +140,8 @@ end
|
|
139
140
|
#
|
140
141
|
|
141
142
|
module LRD::FormBuilder
|
142
|
-
def labeled_input(method, options = {})
|
143
|
-
@template.labeled_input(@object_name, method, objectify_options(options))
|
143
|
+
def labeled_input(method, options = {}, &block)
|
144
|
+
@template.labeled_input(@object_name, method, objectify_options(options), &block)
|
144
145
|
end
|
145
146
|
def unlabeled_submit(text = nil)
|
146
147
|
@template.unlabeled_submit(text)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lrd_view_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Evan Dorn
|
@@ -15,11 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-27 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
22
|
-
description: Compatible with Rails 3.x. Don't even bother trying with Rails 2.x or before.'
|
22
|
+
description: View helpers and defaults for LRD projects. Compatible with Rails 3.x. Don't even bother trying with Rails 2.x or before.'
|
23
23
|
email: evan@lrdesign.com
|
24
24
|
executables: []
|
25
25
|
|