On 5 Dec 2011 22:48, "gerbdla" <gerb...@gmail.com> wrote:
>
> I have this statement
> ids = athlete.leagues.select("league_id").map(&league_id)
>

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

ids = athlete.leagues.select{|league|league.id = league_id}.map(&:league_id)

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

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