noodall-form-builder 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -105,5 +105,15 @@ module Noodall
|
|
105
105
|
end
|
106
106
|
return true if self.errors.empty?
|
107
107
|
end
|
108
|
+
|
109
|
+
def method_missing(method)
|
110
|
+
# If the form doesn't have a field that matches this method, act normally. Otherwise, return nil to show the field is empty.
|
111
|
+
if form.fields.select{|f| f.underscored_name.to_sym == method}.empty?
|
112
|
+
super
|
113
|
+
else
|
114
|
+
return nil
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
108
118
|
end
|
109
119
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noodall-form-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Steve England
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-07-
|
20
|
+
date: 2011-07-18 00:00:00 +01:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|