title: Rails and ActiveModelSerializer: Merging two collections
body: <p>I have two models <strong>ExpenseLog</strong> and <strong>IncomeLog</strong> with one serializer each (using active_model_serializers gem).</p>
  
  <p>I have a controller with a method that should return all the logs (both expensesLogs and incomesLogs) of the last 30 days.
  I have to merge both collections, and use the serializer for each item (if it is an ExpenseLog, using ExpenseLogSerializer, and if it is an IncomeLog, using an IncomeLogSerializer).</p>
  
  <p>First, I have two questions:
  1) Is there any way to first merging both collections and then serialize them?
  2) If not, how can I do to serialize the collection without using the "render json: collection" way? Because I need to store the json result at a variable for merging with the another collection.</p>