Looking to create a business directory that can be sorted first by state then city (similar to Craigslist).
Should I create a state model and city model separately or created a locations model with both state and city as separate columns in the locations table?
I would go with 2 columns: state
and city
.
In order to go something like:
Collection.order('state ASC')
or
Collection.order('city ASC')
Depends after on how complex you want the thing to be.