阅读背景:

将Rails中的主键更改为字符串

来源:互联网 

So I've got two models, State and Acquisition. State has_many Acquisitions. I felt like an autoincrementing integer primary key for 51 records was rather silly. So I altered the model for the State to be the PK (State being the two letter abbreviation; I'm not storing the actual state name anywhere:So I've got two models, State and Acquisition.




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: