noodall-form-builder 0.2.10 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -96,5 +96,15 @@ module Noodall
96
96
  self.add_error(field.underscored_name.to_sym, "can't be empty") if self.send(field.underscored_name).blank?
97
97
  end
98
98
  end
99
+
100
+ def method_missing(method)
101
+ # If the form doesn't have a field that matches this method, act normally. Otherwise, return nil to show the field is empty.
102
+ if form.fields.select{|f| f.underscored_name.to_sym == method}.empty?
103
+ super
104
+ else
105
+ return nil
106
+ end
107
+ end
108
+
99
109
  end
100
110
  end
@@ -1,5 +1,5 @@
1
1
  module Noodall
2
2
  module FormBuilder
3
- VERSION = "0.2.10"
3
+ VERSION = "0.2.11"
4
4
  end
5
5
  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: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 10
10
- version: 0.2.10
9
+ - 11
10
+ version: 0.2.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Steve England
@@ -17,12 +17,13 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-06-27 00:00:00 +01:00
20
+ date: 2011-07-18 00:00:00 +01:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
24
- name: bundler
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
24
+ prerelease: false
25
+ type: :development
26
+ requirement: &id001 !ruby/object:Gem::Requirement
26
27
  none: false
27
28
  requirements:
28
29
  - - ">="
@@ -33,12 +34,12 @@ dependencies:
33
34
  - 0
34
35
  - 0
35
36
  version: 1.0.0
36
- type: :development
37
- prerelease: false
38
- requirement: *id001
37
+ version_requirements: *id001
38
+ name: bundler
39
39
  - !ruby/object:Gem::Dependency
40
- name: fastercsv
41
- version_requirements: &id002 !ruby/object:Gem::Requirement
40
+ prerelease: false
41
+ type: :runtime
42
+ requirement: &id002 !ruby/object:Gem::Requirement
42
43
  none: false
43
44
  requirements:
44
45
  - - ">="
@@ -47,9 +48,8 @@ dependencies:
47
48
  segments:
48
49
  - 0
49
50
  version: "0"
50
- type: :runtime
51
- prerelease: false
52
- requirement: *id002
51
+ version_requirements: *id002
52
+ name: fastercsv
53
53
  description: Functionality for building custom forms
54
54
  email: []
55
55
 
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  requirements: []
206
206
 
207
207
  rubyforge_project:
208
- rubygems_version: 1.4.1
208
+ rubygems_version: 1.5.1
209
209
  signing_key:
210
210
  specification_version: 3
211
211
  summary: Noodall Form Builder