[Rails] Re: Store find output in a new array

2009-02-26 Thread Remco Swoany
Remco Swoany wrote: > Billy Hsu wrote: >> [code] >> ticket_fee = []find(:all).map{|record| ticket_fee << record.ticket_fees} >> [/code] >> >> Try it:) >> btw, find(:all) you can write: 'all': >> Ticket.find(:all) #=> Ticket.all >> >> >> >> >> On Thu, Feb 26, 2009 at 5:17 PM, Remco Swoany < >>

[Rails] Re: Store find output in a new array

2009-02-26 Thread Remco Swoany
Billy Hsu wrote: > [code] > ticket_fee = []find(:all).map{|record| ticket_fee << record.ticket_fees} > [/code] > > Try it:) > btw, find(:all) you can write: 'all': > Ticket.find(:all) #=> Ticket.all > > > > > On Thu, Feb 26, 2009 at 5:17 PM, Remco Swoany < > rails-mailing-l...@andreas-s.net>

[Rails] Re: Store find output in a new array

2009-02-26 Thread Frederick Cheung
On Feb 26, 9:20 am, CFC wrote: > [code] > ticket_fee = []find(:all).map{|record| ticket_fee << record.ticket_fees} You might as well just do find(:all).map{|record| record.ticket_fees} Fred > [/code] > > Try it:) > btw, find(:all) you can write: 'all': > Ticket.find(:all) #=> Ticket.all > >

[Rails] Re: Store find output in a new array

2009-02-26 Thread CFC
[code] ticket_fee = []find(:all).map{|record| ticket_fee << record.ticket_fees} [/code] Try it:) btw, find(:all) you can write: 'all': Ticket.find(:all) #=> Ticket.all On Thu, Feb 26, 2009 at 5:17 PM, Remco Swoany < rails-mailing-l...@andreas-s.net> wrote: > > Hi, > > the array below is the o