Would love to hear your input on this:
I have a model called Demonstration.
A Demonstration can take place on any, some or all of the days in a
i.e. Monday, Tuesday and Friday
How should I setup my model(s) to support this relationship? Is there a
Two ideas i’ve had:
Create a model named Days with a row for each day of the week.
Create a days_demonstrations table and create a HABTM relationship
Use the built in Date::DAYNAMES that comes with Ruby. Create a field
in the Demonstration table called ‘days’ and store the supported days as
a string: 0,3,5. Then break it up when it’s time to use them as check
boxes in the view.