Skip to content
Snippets Groups Projects
Commit 62bec799 authored by Bernardo Chagas's avatar Bernardo Chagas
Browse files

Fix update error in extra_params

parent 2fb0ab22
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment