What we're listening to:
Jared

The Hold Steady:
Heaven Is Whenever
Jeff

Paper Route:
Absence

By default I include the rails t.timestamps in my create table migrations. Always nice to know when a model has been created or updated, right? And what could it hurt?

Well, when they are in a join table for a habtm relationship they cause the associated records to be marked as readonly. This is because rails can’t save those extra timestamp attributes.

If timestamps or any other extra join information is needed, then use a join model instead with has_many :through.

more info

blog comments powered by Disqus