Skip to content

Commit

Permalink
Use simpler syntax to get post for delete example (#1364)
Browse files Browse the repository at this point in the history
  • Loading branch information
radar authored and josevalim committed Apr 11, 2016
1 parent c1a38c5 commit 57ea6bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ecto/repo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ defmodule Ecto.Repo do
## Example
[post] = MyRepo.all(from(p in Post, where: p.id == 42))
post = MyRepo.get!(Post, 42)
case MyRepo.delete post do
{:ok, struct} -> # Deleted with success
{:error, changeset} -> # Something went wrong
Expand Down

0 comments on commit 57ea6bb

Please sign in to comment.