custom_fields 1.0.0.beta.8 → 1.0.0.beta.9
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/field.rb +5 -3
- data/lib/custom_fields/version.rb +1 -1
- metadata +4 -4
data/README
CHANGED
data/lib/custom_fields/field.rb
CHANGED
@@ -34,10 +34,9 @@ module CustomFields
|
|
34
34
|
|
35
35
|
## callbacks ##
|
36
36
|
before_validation :set_alias
|
37
|
-
after_validation :set_target_klass_flag
|
37
|
+
after_validation :set_target_klass_flag
|
38
38
|
|
39
|
-
|
40
|
-
before_update :invalidate_target_klass
|
39
|
+
before_save :invalidate_target_klass
|
41
40
|
after_destroy :invalidate_target_klass
|
42
41
|
|
43
42
|
## methods ##
|
@@ -163,8 +162,11 @@ module CustomFields
|
|
163
162
|
if self._parent.instance_variable_get(:@_writing_attributes_with_custom_fields)
|
164
163
|
if self.destroyed? # force the parent to invalidate the related target class
|
165
164
|
self.set_target_klass_flag
|
165
|
+
elsif self.changed?
|
166
|
+
self.set_target_klass_flag
|
166
167
|
end
|
167
168
|
else
|
169
|
+
self.set_target_klass_flag
|
168
170
|
self._parent.save
|
169
171
|
end
|
170
172
|
end
|
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: 62196369
|
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
|
+
- 9
|
12
|
+
version: 1.0.0.beta.9
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Didier Lafforgue
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-03-
|
20
|
+
date: 2011-03-22 00:00:00 +01:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|