http://railscasts.com/episodes/74-complex-forms-part-2
but I'm getting this error after I submit. Any ideas?
undefined method `each' for "":String
I think you may need to show us the code around the error.
Colin
I'm guessing that you are using Ruby 1.9, Ruby 1.8 had a String#each
method, Ruby 1.9 does not, you need to use each_line instead.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
Sounds like you have hit the same one I did:
@object.photos.build
But then in my form I only had one field for the photo object. It was
trying to build the photo objects with just one string as input and
that is what was giving the method 'each' error for String.
> http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/...