Re: [Rails] Re: Create a new hash from an existing table

2012-02-13 Thread Colin Law
On 13 February 2012 07:00, edward michaels wrote: > Thanks, your idea did help. > > if I do: > > date = > reduce = Time.where(:date => date) I think you might run into trouble using a class Time as this is already a ruby class. Colin -- You received this message because you are subscribed to

[Rails] Re: Create a new hash from an existing table

2012-02-12 Thread edward michaels
Thanks, your idea did help. if I do: date = reduce = Time.where(:date => date) hour_on_date = reduce.collect {|x| x.hour} Now I just need to figure out how to make a hash key which triggers the hour_on_date array value. On Feb 11, 8:50 pm, Everaldo Gomes wrote: > Hi! > > Take a look at: > >