Dan Langevin wrote:
I am trying to create multiple objects from the same "add" form
For example:
Say I have a page where I want to add two movies, I have currently tried
<input type="text" name="movie[0][name]">
<input type="text" name="movie[1][name]">
The problem comes in the controller. The keys (0 and 1) are passed as Symbols and I get an error saying
"Symbol as array index"
when I try
for movie in @params[:movie] Movie.create(movie) end
Try: for movie in params[:movie].values