I have the following models : # Foo model schema "foo" do field :name, :string has_many: :bars, App.Bar end # App model schema "bar" do field :name, :string belongs_to: foo, App.Foo end And this form: # form.html (Foo) <%= form_for @changeset, @action, fn f -> %> <%= text_input f, :name, class: "form-control" %> <%= submit "Submit", class: "btn btn-primary" %> <% end %> Inside this form, how can I