From 393f3379423a7a1336e215688f6bae003b4b57f9 Mon Sep 17 00:00:00 2001
From: Mateus Rambo Strey <mars11@inf.ufpr.br>
Date: Mon, 16 May 2016 11:29:08 -0300
Subject: [PATCH] fix licenses index

---
 app/controllers/v1/licenses_controller.rb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/app/controllers/v1/licenses_controller.rb b/app/controllers/v1/licenses_controller.rb
index f18dca6d..80482b2e 100644
--- a/app/controllers/v1/licenses_controller.rb
+++ b/app/controllers/v1/licenses_controller.rb
@@ -5,9 +5,7 @@ class V1::LicensesController < ApplicationController
   # GET /licenses
   # GET /licenses.json
   def index
-    @licenses = License.all
-
-    render json: @licenses
+    render json: ActiveModel::ArraySerializer.new(License.all, each_serializer: LicenseSerializer)
   end
 
   # GET /licenses/1
-- 
GitLab