I am looking for advice on how to design a web app that shows a week view for a todo list.
The current layout is a table with days of the week as columns with items to be done listed below. I have gotten something functional by calculating the header dates in the controller with:
@week_starting = Date.today.at_beginning_of_week if @week_starting.blank?
Other weekday headers are shown by incrementing @week_starting.
I have created individual instance variables such as @to_do_on_mon, @to_do_on_tue, etc. to show what is to be done that day (and then iterate through them to list out the items). Here is an example of one:
@to_do_on_mon = BatchTicket.where("Date(load_date) =?", @week_starting.strftime
How would you improve on this design to easily increment/decrement the week shown and list out items to be done?