On 18 September 2011 00:44, 7stud -- <li...@ruby-forum.com> wrote:
> 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?

@7Stud: Had you quoted anything in your post I might have realised
that this was in response to a previous question.  As it was, your
post appeared to be a request for help in understanding some code.
Please try to make your posts more clear in order to avoid wasting my
time.  Thanks.

Colin

-- 
gplus.to/clanlaw

-- 
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.

Reply via email to