2008-05-22

使用include中嵌Hash取出一个多层次的对象关联数据

关键字: ruby ror model active_record
使用include中嵌Hash取出一个多层次的对象关联数据. 首先有如下关系: project issue : 一对多 issue comment : 一对多 comment history : 一对多 Project [1] <---- [n] issue (1) <---- (n) comment [1] <---- [n] history class Project has_many :issues end class Issue belongs_to :project has_many :cccc # c ...
xu_wccq
搜索本博客
我的相册
Ac7ad940-edbc-3b23-8443-5fe2ea338061-thumb
productcenter.bmp
共 2 张
最近加入圈子
存档
最新评论