I'm building a property management (apartments) application in Rails 3.2. Both units and properties have amenities. A property may have amenities like "On bus route" and "Coin op laundry" and a unit may have amenities like "Air conditioning" and "Handicap accessible". I had originally named my property amenities resource table amenities
and the join table amenities_properties
. However, now that I'm starting to build my amenities table for units I'm not sure how I should name these. I could go with amenities_properties
and amenities_units
. But then do I call the join tables amenities_properties_properties
and amenities_units_units
? Seems weird to me.
Would it maybe be better to have an amenities
table that had a type field to indicate if it belongs to units or properties?