阅读背景:

使用Rails,不确定我是否应该使用belongs_to

来源:互联网 

Very new to Rails... I'm building out functionality that lets people compare photos, and I can't decide exactly how I should structure it. Ideally what I'd like is to have a "comparisons" table which keeps a record of the IDs of the photos compared as well as the user that compared them, but I'm not quite sure whether this warrants use of the "belongs_to" function or not. If so, how do I specify that each comparison belongs to TWO separate photos?Very new to Rails... I'm building out functiona




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

分享到: