database - Rails preference tables and over-riding -


i'm wondering best way go following design problem:

i have user have preferences table. have venue, belongs user. want following functionality:

a venue have preferences, of set in preference table belonging user. want these "default" preferences. however, each individual venue can override these preferences.

single table inheritance? separate models , check existence of "venue preferences?"

assuming user's default preferences , user's specific venue preferences have same exact attributes, seems candidate single table inheritance. so, preferences have both user id venue id. then, in order determine actual preferences venue be, you'd first check see if there preferences venue. otherwise, default user's preferences.


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -