Skip to content

Instantly share code, notes, and snippets.

@nhu313
Created September 7, 2015 21:40
Show Gist options
  • Save nhu313/8e352e5bf5b8e438b07b to your computer and use it in GitHub Desktop.
Save nhu313/8e352e5bf5b8e438b07b to your computer and use it in GitHub Desktop.
[error] #PID<0.302.0> running MyApp.Endpoint terminated
Server: localhost:4000 (http)
Request: GET /todo_lists/new
** (exit) an exception was raised:
** (ArgumentError) cannot generate inputs_for for field :todo_items with type {:assoc, %Ecto.Association.Has{cardinality: :many, defaults: [], field: :todo_items, on_cast: :changeset, on_delete: :nothing, on_replace: :delete, owner: MyApp.TodoList, owner_key: :id, queryable: MyApp.TodoItem, related: MyApp.TodoItem, related_key: :todo_list_id}}
(phoenix_ecto) lib/phoenix_ecto/html.ex:164: Phoenix.HTML.FormData.Ecto.Changeset.find_inputs_for_type!/2
(phoenix_ecto) lib/phoenix_ecto/html.ex:30: Phoenix.HTML.FormData.Ecto.Changeset.to_form/4
(phoenix_html) lib/phoenix_html/form.ex:255: Phoenix.HTML.Form.inputs_for/4
(my_app) web/templates/todo_list/form.html.eex:18: anonymous fn/2 in MyApp.TodoListView.form.html/1
(phoenix_html) lib/phoenix_html/form.ex:227: Phoenix.HTML.Form.form_for/4
(my_app) web/templates/todo_list/form.html.eex:1: MyApp.TodoListView."form.html"/1
(my_app) web/templates/todo_list/new.html.eex:3: MyApp.TodoListView."new.html"/1
(phoenix) lib/phoenix/view.ex:197: Phoenix.View.render_within/3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment