From 62bec7997c842750dd72acb5e7e5f537dfc95b0d Mon Sep 17 00:00:00 2001 From: bca <bca@inf.ufpr.br> Date: Fri, 25 Nov 2016 11:04:12 -0200 Subject: [PATCH] Fix update error in extra_params --- 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 600fe8a7..c419f856 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]) + @collection.add_items(extra_params[:items]) unless extra_params[:items].is_nil? render json: @collection, status: :ok else render json: @collection.errors, status: :unprocessable_entity -- GitLab