lib/ruby-fs-stack/familytree.rb in ruby-fs-stack-0.4.10 vs lib/ruby-fs-stack/familytree.rb in ruby-fs-stack-0.4.11
- old
+ new
@@ -739,10 +739,10 @@
# ** :lineage (optional) - 'Biological', 'Adoptive', etc.
# ** :event - a hash with values {:type => 'Marriage', :date => '15 Nov 2007', :place => 'Utah, United States'}
# ** :ordinance - a hash with values {:date => '15 Nov 2007', :temple => 'SLAKE', :place => 'Utah, United States', :type => "Sealing_to_Spouse"}
def add_relationship(options)
g_command = get_command(options[:type])
- relationship = self.send(g_command.to_sym).find{|r|r.id == options[:with]}
+ relationship = self.send(g_command.to_sym).find{|r|r.id == options[:with] || r.requestedId == options[:with]}
if relationship.nil?
relationship = Relationship.new
relationship.id = options[:with]
end
if options[:lineage]
\ No newline at end of file