1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/interactors/merge_account_person.rb
2019-08-14 19:55:00 +05:00

18 lines
398 B
Ruby

# frozen_string_literal: true
class MergeAccountPerson
include Interactor::Organizer
organize MergeContactLists, SetAccountPerson, DestroyContactList
around do |interactor|
ActiveRecord::Base.transaction do
interactor.call
end
end
before do
context.old_contact_list = context.account.contact_list
context.new_contact_list = context.person.contact_list
end
end