Skip to content

Instantly share code, notes, and snippets.

@janjiss
Created December 14, 2015 13:06
Show Gist options
  • Select an option

  • Save janjiss/d92544eff3d556bc804d to your computer and use it in GitHub Desktop.

Select an option

Save janjiss/d92544eff3d556bc804d to your computer and use it in GitHub Desktop.
changeset = Entry.changeset(%Entry{}, params)
if changeset.valid? do
Repo.insert(changeset)
## Oh the happy path
else
## The sad path :(
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment