From af665266fa5091c5655c76563e25fdf669928c34 Mon Sep 17 00:00:00 2001
From: bca <bca@inf.ufpr.br>
Date: Mon, 28 Nov 2016 09:26:46 -0200
Subject: [PATCH] Fix error in update

---
 app/controllers/v1/collections_controller.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/controllers/v1/collections_controller.rb b/app/controllers/v1/collections_controller.rb
index c419f856..0af933b4 100644
--- a/app/controllers/v1/collections_controller.rb
+++ b/app/controllers/v1/collections_controller.rb
@@ -43,7 +43,7 @@ class V1::CollectionsController < ApplicationController
   # PUT/PATCH /v1/users/1.json
   def update
     if @collection.update(collection_params)
-      @collection.add_items(extra_params[:items]) unless extra_params[:items].is_nil?
+      @collection.add_items(extra_params[:items]) unless extra_params[:items].nil?
       render json: @collection, status: :ok
     else
       render json: @collection.errors, status: :unprocessable_entity
-- 
GitLab