I have gone to the api and have searched the internet and looked
through the books that I have, but I am having trouble finding an
explanation on what the .build method actually does and how it is
I guess the best example is if I want to create a todo list
application where I can create a new todo list and add to do items all
at the same time.
I would post to the todolist controller to create the todo list but
then it would error out as I have multiple todo items in the params
hash that look like this params[:todo_items].. It would say that there
is no method for todo_items=
So i would create my accessor method in the todolist model like this:
# located in Todolist model
todo_items.each do |todo_items|
But what is that build actually doing!?! Why am i using the plural
form of todo_lists? Any help would be MUCH appreciated!