Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save janjiss/aa422f9931a248470082 to your computer and use it in GitHub Desktop.
def set_password_digest(changeset) do
password = Ecto.Changeset.get_field(changeset, :password)
change(changeset, %{password_digest: crypt_password(password)})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment