Simplify an instruction in ExercicesAdapter#process_params

This commit is contained in:
gregoirenovel 2018-10-04 18:47:39 +02:00
parent d93f696935
commit b28607a3a6

View file

@ -10,7 +10,7 @@ class ApiEntreprise::ExercicesAdapter < ApiEntreprise::Adapter
exercice.slice(*attr_to_fetch)
end
if exercices_array == exercices_array.select { |params| valid_params?(params) }
if exercices_array.all? { |params| valid_params?(params) }
{ exercices_attributes: exercices_array }
else
{}