class Register < User
end
class Admin < User
end
class Project < ActiveRecord::Base
has_many :admin, :class => 'User', :conditions => "type = 'admin'"
has_many :registers, :class => 'User', :conditions => "type = 'registers'"
end
the problem here is that when I use project to has_many create a register or administrator, it does not automate filling the object class into filed type.
like this: project.admins.new.
How to solve this problem?
source
share