Created
July 31, 2017 09:27
-
-
Save motephyr/e6ea0e2d028c95f8f7c39dfcd9bf8ae5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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(struct, params \\ %{}) do | |
struct | |
|> cast(params, [:house_id]) | |
|> cast_attachments(params, [:image], allow_paths: true) | |
|> validate_required([:image, :house_id]) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment