2016-11-25 16:10:37 +00:00
|
|
|
module Import
|
|
|
|
module TransactionFactory
|
|
|
|
include Import::BaseFactory
|
|
|
|
|
|
|
|
# rubocop:disable Style/ModuleFunction
|
|
|
|
extend self
|
|
|
|
|
2016-12-20 15:16:09 +00:00
|
|
|
def import(records, *args)
|
2016-11-25 16:10:37 +00:00
|
|
|
ActiveRecord::Base.transaction do
|
2016-12-20 15:16:09 +00:00
|
|
|
import_action(records, *args)
|
2016-11-25 16:10:37 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|