Created
March 29, 2019 17:07
-
-
Save m3ta4a/2e8ea8090fb793ff6006b81b12135c13 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def changeset(person, attrs) do | |
person | |
|> cast(attrs, [:name, :age, :birthday, :address]) | |
|> validate_required([:name, :age, :birthday, :address]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment