[英]cancel association for inhereted STI model
我在称为User的STI父模型中设置了has_many关联,从User继承的模型是Group,并且我不希望Group具有has_many关联,有没有办法做到这一点?
The following should work: 以下应该工作:
class User < ActiveRecord::Base
has_many :relations
end
class Group < User
undef :relations
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.