新手问题 has_many 的 source_type 可以是多个类名吗?

doruby · 2013年01月31日 · 最后由 fsword 回复于 2013年02月01日 · 2490 次阅读

has_many 的 source_type 可以是多个吗?

和 stackoverflow 上这位仁兄一样的疑问,但没看到回答 ruby on rails polymorphic has_many relationship - more than one :source_type? http://stackoverflow.com/questions/11458536/ruby-on-rails-polymorphic-has-many-relationship-more-than-one-source-type

匿名 #2 2013年01月31日

这个就要用继承了吧

最近没用过,不太确定了

需要 登录 后方可回复, 如果你还没有账号请 注册新账号