摘要: 很基础,但是却搞很久,在这里总结一下。class User < ActiveRecord::Base has_many :borrows has_many :books, :through => :borrowsendclass Book < ActiveRecord::Base has_many :borrows has_many :users, :through => :borrowsendclass Borrow < ActiveRecord::Base belongs_to :user belongs_to :bookend非常基础的多对多关系模型,需要注 阅读全文
posted @ 2013-05-21 22:15 ZeRolin 阅读(600) 评论(0) 推荐(0) 编辑