problem with select

I have this statement
ids ="league_id").map(&league_id)

getting this error
(expected Proc)"

Anyone know what is going on here?

by the way not a girl :slight_smile:
gerbdla = gerber david los angeles
long story.

What is it that youโ€™re trying to do with this statement? The closest i can guess is the following:

ids ={|league| = league_id}.map(&:league_id)

But that just gives an array of league_ids the same as the one you started with.

Instead this worked. Not sure exactly why the other works and not


because ".select" returns only those elements that return true to an
evaluation, while ".collect" returns the result of the block passed to
every element. Have a look at the Enumerable and Array api pages.