On 18 September 2011 00:44, 7stud -- wrote:
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?
Not really. It was contrived, not a coincidence.
It may have been interesting had you done the same thing as the OP...
but you missed out one part of the collect. It would be more helpful
if you'd asked the OP to confirm what was in the @sub_seasons variable
- to double-check there wasn't an array of arrays in it. It sure is
possible that she'd already performed a collect. But you didn't - you
belittle without any explanation, and as you more frequently are than
not: you're wrong.
Now if I wished to be as snide and sarcastic as you, I'd leave my post
there, but instead, I'll suggest that *maybe* if you'd copied the OP's
collect instead of spitefully hinting at your perceived superiority,
the error you'd get would actually have been:
NoMethodError: undefined method `sub_season_type' for [1, 2]:Array
...seeing as the original collect accesses .sub_season_type before it
Now, OP, can you please show the code that populates @sub_seasons in
the controller - as I think the problem is something to do with what
that's being filled with - it may be an array of arrays, or something
else, but it would be nice to see.
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 email@example.com.
To unsubscribe from this group, send email to firstname.lastname@example.org.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.