has_moderated 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module HasModerated
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
3
3
  end
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: 59
4
+ hash: 57
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 18
10
- version: 0.0.18
9
+ - 19
10
+ version: 0.0.19
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jan Berdajs