has_moderated 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
@@ -50,7 +50,7 @@ module HasModerated
|
|
50
50
|
assoc_details.primary_key_name
|
51
51
|
end
|
52
52
|
arec.send(fk.to_s+"=", rec.id) # set association to the newly created record
|
53
|
-
attrs.each_pair do |key, val|
|
53
|
+
attrs && attrs.each_pair do |key, val|
|
54
54
|
arec.send(key.to_s+"=", val) unless key.to_s == 'id' || key.to_s == fk.to_s
|
55
55
|
end
|
56
56
|
# disable moderation for associated model (if moderated)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_moderated
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 57
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 19
|
10
|
+
version: 0.0.19
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jan Berdajs
|