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

doruby · January 31, 2013 · Last by fsword replied at February 01, 2013 · 2490 hits

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

Unknow user #2 January 31, 2013

这个就要用继承了吧

最近没用过,不太确定了

You need to Sign in before reply, if you don't have an account, please Sign up first.