[Rails] problem with select

2011-12-05 Thread gerbdla
I have this statement ids = athlete.leagues.select(league_id).map(league_id) getting this error Subject: [] athlete_injuries#create (TypeError) wrong argument type Fixnum (expected Proc) Anyone know what is going on here? by the way not a girl :) gerbdla = gerber david los angeles long story.

Re: [Rails] problem with select

2011-12-05 Thread Michael Pavling
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 =

[Rails] Problem with %=select%

2009-10-01 Thread Rafael Roque
Hi all, Today I have the following: %= select( x, Y, { = ,FOO = F ,BAR = B}) % Now I have to test each item in the hash against a determined condition and display only if the test returns true.How could I do that? -- Posted via http://www.ruby-forum.com/.