Make save_application_record_object work with arrays
This commit is contained in:
parent
8388af20f0
commit
9cfead9723
|
|
@ -4,10 +4,8 @@ class SaveApplicationRecordObject
|
|||
include Interactor
|
||||
|
||||
def call
|
||||
if context.object_to_save.save
|
||||
nil
|
||||
else
|
||||
context.fail!
|
||||
Array(context.object_to_save).flatten.each do |object|
|
||||
context.fail! unless object.save
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue