Make save_application_record_object work with arrays

This commit is contained in:
Daniel Schädler 2019-05-14 13:30:20 +02:00
parent 8388af20f0
commit 9cfead9723
1 changed files with 2 additions and 4 deletions

View File

@ -4,10 +4,8 @@ class SaveApplicationRecordObject
include Interactor include Interactor
def call def call
if context.object_to_save.save Array(context.object_to_save).flatten.each do |object|
nil context.fail! unless object.save
else
context.fail!
end end
end end
end end