Colin Law wrote in post #1022477: > On 17 September 2011 20:49, 7stud -- <li...@ruby-forum.com> wrote: >> --output:-- >> >> undefined method `id' for [1, 2]:Array (NoMethodError) > > I am not sure why you would expect anything else. @sub-seasons is an > array. The collect method passes each element of @sub-seasons to the > block, so the first time round element is an array [1,2]. An array > does not have a method 'id' hence the error. What were you expecting > it to do? >
It's interesting isn't it, that what I posted has the same error that the op posted. Do you think that is just a coincidence? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.