join_collection 0.0.2 → 0.1.0

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.
Files changed (2) hide show
  1. data/lib/join_collection.rb +2 -2
  2. metadata +1 -1
@@ -1,6 +1,6 @@
1
1
  class JoinCollection
2
2
 
3
- VERSION = "0.0.2"
3
+ VERSION = "0.1.0"
4
4
 
5
5
  attr_reader :source_objects
6
6
  attr_accessor :join_type, :singular_target, :plural_target
@@ -74,7 +74,7 @@ class JoinCollection
74
74
  when plural_target
75
75
  doc[plural_target] = target_objects if join_type == :join_many
76
76
  else
77
- doc["#{singular_target}_#{field}"] = target_object.send(field)
77
+ doc["#{singular_target}_#{field}"] = target_object.try(field)
78
78
  end
79
79
  end
80
80
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: join_collection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: