I need to build an array that contains lots of date objects.
I’ve got a booking model and it contains stuff like this…
create_table “bookings”, :force => true do |t|
SOO - each booking starts on a date and finishes on a date…
I need to collect up all the booking dates in an array so that I can do
stuff with them…
I figure i need a method in my model to do it…
find(:all); # first off find all the booking records @BookedDays = ( XXX ).map # do something here to create an array
with all the dates in, maybe I need a loop … sorry bit stuck?
be grateful for any tips.