Class: MoveToGo::Organizations::DuplicateSet

Inherits:
Array
  • Object
show all
Defined in:
lib/move-to-go/model/organizations.rb

Instance Method Summary collapse

Instance Method Details

#merge_all!Object

Moves all data to the first organization and returns the remaining orgs



10
11
12
13
14
15
16
17
18
19
# File 'lib/move-to-go/model/organizations.rb', line 10

def merge_all!()
    return self.map{ |org|
        if org != self.first
            self.first.move_data_from(org)
            org
        end
    }
    .flatten
    .compact
end