small medium large xlarge

Generic-user-small
13 Nov 2017, 16:37
David Besserman (1 post)

Hi,

In the 6th chapter, a new video is associated with the current_user

def new(conn, _params) do  
  changeset =
    conn.assigns.current_user 
    |> build_assoc(:videos)
    |> Video.changeset()

    render(conn, "new.html", changeset: changeset)
  end

What is the purpose of doing that in the new action ?

You must be logged in to comment