lib/registry/registry_record.rb
# Adds a source record to the cluster.
#
# source_record - SourceRecord object
#
# So we don't have to recollate an entire cluster for the
# addition of one rec
Adds a source record to the cluster.

So we don't have to recollate an entire cluster for the
addition of one rec
Adds a source record to the cluster . So we don ' t have to recollate an entire cluster for the addition of one rec
def add_source(source_record)
      if source_record_ids.include? source_record.source_id
        recollate
      else
        source_record_ids << source_record.source_id
        self.source_org_codes << source_record.org_code
        @@collator.extract_fields([source_record]).each do |field, value|
          self[field] ||= []
          self[field] << value
          self[field] = self[field].flatten.uniq
        end
        source_record_ids.uniq!
        self.source_org_codes.uniq!
        self.series = (series + source_record.series).uniq
      end
      set_ht_availability
      save
    end
def add_source ( source_record ) if source_record_ids . include? source_record . source_id recollate else source_record_ids << source_record . source_id self . source_org_codes << source_record . org_code @@collator . extract_fields ( [ source_record ] ) . each do | field , value | self [ field ] ||= [ ] self [ field ] << value self [ field ] = self [ field ] . flatten . uniq end source_record_ids . uniq! self . source_org_codes . uniq! self . series = ( series + source_record . series ) . uniq end set_ht_availability save end
Adds a source record to the cluster.
Adds a source record to the cluster .
# if it's already in this record then we have to recollate. # otherwise we have no way of removing old data extractions
source_record