Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions phoenix-framework/04-REST/guide/3_cat_controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ Your controller should look like:
case CatContext.delete_cat(cat) do # Delete the cat from the database
{:ok, %Cat{}} -> #If delete sucessfull, send a 200 message
send_resp(conn, :no_content, "")
{:error, cs} -> # If delete failed, notify the end user about the failure
{:error, _cs} -> # If delete failed, notify the end user about the failure
conn
|> send_resp(400, "Something went wrong, sorry.")
end
Expand Down Expand Up @@ -334,4 +334,4 @@ Start the server with an interactive session and send a GET index request to `lo

The user as a parameter cats which is `#Ecto.Association.NotLoaded<association :cats is not loaded>` whilce the user_with_loaded_cats has a list of cats which are loaded. The original user has not changed as those changes are impossible in a functional programming language.

Delete `require IEx; IEx.pry` to not pauze execution with every request.
Delete `require IEx; IEx.pry` to not pauze execution with every request.