Topic: Default object in collection


One item has many images. One of the images should be default. When the default image is deleted another image must be set to default by the user or by the system. Best way to implement?

is_default boolean on image
belongs_to image on item?

Using callbacks to maintain consistency?

Pros and cons? I want the most simple and solid solution. Is there any best practices?