custom_fields 1.0.0.beta.10 → 1.0.0.beta.11
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/lib/custom_fields/custom_fields_for.rb +11 -1
- data/lib/custom_fields/version.rb +1 -1
- metadata +19 -21
data/README
CHANGED
@@ -67,7 +67,17 @@ module CustomFields
|
|
67
67
|
field :#{singular_name}_custom_fields_counter, :type => Integer, :default => 0
|
68
68
|
field :#{singular_name}_custom_fields_version, :type => Integer, :default => 0
|
69
69
|
|
70
|
-
embeds_many :#{singular_name}_custom_fields, :class_name => '#{dynamic_custom_field_class_name}'
|
70
|
+
embeds_many :#{singular_name}_custom_fields, :class_name => '#{dynamic_custom_field_class_name}' do
|
71
|
+
def build(attributes = {}, type = nil, &block)
|
72
|
+
instantiated(type).tap do |doc|
|
73
|
+
append(doc, default_options(:binding => true))
|
74
|
+
doc.write_attributes(attributes)
|
75
|
+
doc.identify
|
76
|
+
block.call(doc) if block
|
77
|
+
end
|
78
|
+
end
|
79
|
+
alias :new :build
|
80
|
+
end
|
71
81
|
|
72
82
|
attr_accessor :invalidate_#{singular_name}_klass_flag
|
73
83
|
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: custom_fields
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196373
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 1.0.0.beta.
|
11
|
+
- 11
|
12
|
+
version: 1.0.0.beta.11
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Didier Lafforgue
|
@@ -17,47 +17,44 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-05-
|
20
|
+
date: 2011-05-16 00:00:00 +02:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
|
-
name: mongoid
|
25
24
|
prerelease: false
|
26
|
-
|
25
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
27
26
|
none: false
|
28
27
|
requirements:
|
29
28
|
- - ~>
|
30
29
|
- !ruby/object:Gem::Version
|
31
|
-
hash:
|
30
|
+
hash: 13
|
32
31
|
segments:
|
33
32
|
- 2
|
34
33
|
- 0
|
35
|
-
-
|
36
|
-
|
37
|
-
- 7
|
38
|
-
version: 2.0.0.rc.7
|
34
|
+
- 1
|
35
|
+
version: 2.0.1
|
39
36
|
type: :runtime
|
40
|
-
|
37
|
+
requirement: *id001
|
38
|
+
name: mongoid
|
41
39
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: activesupport
|
43
40
|
prerelease: false
|
44
|
-
|
41
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
45
42
|
none: false
|
46
43
|
requirements:
|
47
44
|
- - ">="
|
48
45
|
- !ruby/object:Gem::Version
|
49
|
-
hash:
|
46
|
+
hash: 9
|
50
47
|
segments:
|
51
48
|
- 3
|
52
49
|
- 0
|
53
|
-
-
|
54
|
-
version: 3.0.
|
50
|
+
- 7
|
51
|
+
version: 3.0.7
|
55
52
|
type: :runtime
|
56
|
-
|
53
|
+
requirement: *id002
|
54
|
+
name: activesupport
|
57
55
|
- !ruby/object:Gem::Dependency
|
58
|
-
name: locomotive_carrierwave
|
59
56
|
prerelease: false
|
60
|
-
|
57
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
61
58
|
none: false
|
62
59
|
requirements:
|
63
60
|
- - ">="
|
@@ -67,7 +64,8 @@ dependencies:
|
|
67
64
|
- 0
|
68
65
|
version: "0"
|
69
66
|
type: :runtime
|
70
|
-
|
67
|
+
requirement: *id003
|
68
|
+
name: locomotive_carrierwave
|
71
69
|
description: Manage custom fields to a mongoid document or a collection. This module is one of the core features we implemented in our custom cms named Locomotive.
|
72
70
|
email:
|
73
71
|
- didier@nocoffee.fr
|