defmodule Zoeyscomputer.Gists.Gist do use Ecto.Schema import Ecto.Changeset schema "gists" do field :code, :string field :lang, :string timestamps(type: :utc_datetime) end @doc false def changeset(gist, attrs) do gist |> cast(attrs, [:code, :lang]) |> validate_required([:code, :lang]) end end