I have an active record Times table with a date column and an hour
column. The hours are unique but the dates can have many hours. How
would I create a hash that mapped a date key to its hours? Something
like:

hours_per_date['2/14/2012'] => ['6:00', '8:00', '11:00', '2:00']

Thanks

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 5 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 12, '12 at 1:40a
activeFeb 13, '12 at 9:25a
posts5
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase