     |> put_flash(:info, "Contact deleted successfully.")
     |> redirect(to: contact_path(conn, :index))
   end
+
+  defp load_lots(conn, _) do
+    lots = Lots.list_lots_for_select()
+    assign(conn, :lots, lots)
+  end
 end


  def edit(conn, %{"id" => id}) do
    contact = Lots.get_contact!(id)
    lots = Lots.list_lots_for_select()
    changeset = Lots.change_contact(contact)
    render(conn, "edit.html", contact: contact, changeset: changeset, lots: lots)
  end

  def update(conn, %{"id" => id, "contact" => contact_params}) do


  def new(conn, _params) do
    changeset = Lots.change_contact(%Condorest.Lots.Contact{})
    render(conn, "new.html", changeset: changeset)
  end

  def create(conn, %{"contact" => contact_params}) do
