Rails — use type column without STI?

前端 未结 5 1433
闹比i
闹比i 2020-11-27 15:36

I want to use a column called type without invoking Single Table Inheritance (STI) - I just want type to be a normal column that holds a Stri

5条回答
  •  春和景丽
    2020-11-27 16:15

    I know this question is rather old and this deviates a bit from the question you are asking, but what I always do whenever I feel the urge to name a column type or something_type is I search for a synonym of type and use that instead:

    Here are a couple alternatives: kind, sort, variety, category, set, genre, species, order etc.

提交回复
热议问题