Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eeb8bb9

Browse files
committed
updates to the create and destroy actions
1 parent 3c97ec5 commit eeb8bb9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎app/controllers/api/v1/lists_controller.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ def update
3636

3737
# DELETE /lists/1
3838
def destroy
39-
@list.destroy
39+
if @list.destroy
40+
head :no_content, status: :ok
41+
else
42+
render json: @list.errors, status: :unprocessable_entity
43+
end
4044
end
4145

4246
private

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /