How to limit has_one association to a single record
问题 I am having trouble with retaining only a single record in a has_one relationship Example Categories and question A question belongs_to a category, and a category has_one question In reality as seen in a system i am building even though the has_one relationship exists, there comes a case where i have multiple questions that belong to a category. Shouldn't the has_one relationship limit them to just one record? If not, then how can i make sure that i always keep one record? EDIT Please note