examples/galena/spec/seed.rb
def migrate(row, migrated)
      super
      # Invent the mandatory name fields based on the login, if necessary.
      if login_name then
        last, first = login_name[/[^@]+/].split('.').reverse.map { |s| s.capitalize }
        first ||= 'Oscar'
        self.first_name ||= first
        self.last_name ||= last
      end
      # the coordinator serves as the User content template
      coord = Galena.administrative_objects.hospital.coordinator
      # deep copy of the address
      self.address ||= coord.address.copy
      # shallow copy of the mandatory references
      merge(coord, [:cancer_research_group, :department, :institution])
    end
def migrate(row, migrated)
      super
      # Invent the mandatory name fields based on the login, if necessary.
      if login_name then
        last, first = login_name[/[^@]+/].split('.').reverse.map { |s| s.capitalize }
        first ||= 'Oscar'
        self.first_name ||= first
        self.last_name ||= last
      end
      # the coordinator serves as the User content template
      coord = Galena.administrative_objects.hospital.coordinator
      # deep copy of the address
      self.address ||= coord.address.copy
      # shallow copy of the mandatory references
      merge(coord, [:cancer_research_group, :department, :institution])
    end
Augments +Jinx::Migratable.migrate+ for the example as follows:
 * infer the first and last name from the email address
 * copy the address and organizations from the tissue bank coordinator

 @param (see Jinx::Migratable#migrate)