noodall-form-builder 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/app/models/noodall/field.rb +7 -7
- data/lib/noodall/form_builder/version.rb +1 -1
- metadata +8 -8
data/Gemfile.lock
CHANGED
data/app/models/noodall/field.rb
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
module Noodall
|
2
2
|
class Field
|
3
3
|
include MongoMapper::EmbeddedDocument
|
4
|
-
|
4
|
+
|
5
5
|
key :_type, String, :required => true
|
6
6
|
key :name, String, :required => true
|
7
7
|
key :label, String
|
8
8
|
key :default, String
|
9
9
|
key :required, Boolean, :default => false, :required => true
|
10
|
-
|
10
|
+
|
11
11
|
embedded_in :form
|
12
|
-
|
12
|
+
|
13
13
|
def underscored_name
|
14
|
-
name.parameterize('_').to_s
|
14
|
+
name.parameterize.gsub('-','_').to_s
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def default_class(response)
|
18
18
|
'default-value' if response.send(underscored_name.to_sym) == default
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
def mandatory?
|
22
22
|
Form::MANDATORY_FIELDS.include?(self.name)
|
23
23
|
end
|
24
24
|
end
|
25
|
-
end
|
25
|
+
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: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors: []
|
13
13
|
|
@@ -15,11 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-14 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
23
|
none: false
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
@@ -30,12 +30,12 @@ dependencies:
|
|
30
30
|
- 0
|
31
31
|
- 0
|
32
32
|
version: 1.0.0
|
33
|
+
requirement: *id001
|
33
34
|
type: :development
|
34
35
|
name: bundler
|
35
36
|
prerelease: false
|
36
|
-
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
-
|
38
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
segments:
|
45
45
|
- 0
|
46
46
|
version: "0"
|
47
|
+
requirement: *id002
|
47
48
|
type: :runtime
|
48
49
|
name: fastercsv
|
49
50
|
prerelease: false
|
50
|
-
version_requirements: *id002
|
51
51
|
description: Functionality for building custom forms
|
52
52
|
email: []
|
53
53
|
|