开发者

Help in naming my models [closed]

Closed. This question is off-topic. It is not currently accepting answers. 开发者_开发知识库

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

I have a library app I am writing. The models I have are users and books. Users can checkout books. What should I call the table that keeps track of the books that are loaned out to the users? Right now my top choice is checkouts but I'm not sure this is the best name.

So my models will look like:

User
    has_many :checkouts
    has_many :books, through :checkouts

Checkout
    belongs_to :user
    belongs_to :book

Book
    has_many :checkouts
    has_many :users, through :checkouts

Is there a better name I can use other than checkout?


BookLoans? Loans?

I'd avoid checkout because it is ambiguous and also used a lot for shopping cart applications.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜