阅读背景:

你如何让Rails has_many通过关系来处理has_many条件?

来源:互联网 

I've been working on a project that uses model associations heavily, and it seems like I've found a case where the has_many or has_one through feature conflicts with the :conditions feature. In a nutshell, the problem is that the through association creates a table alias for the intermediate table in the has_one though relationship. But I don't know how to make that table alias appear in the condition I've defined.If that's hard to follow, maybe the code will help:I've been working on a project that uses model




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

分享到: