Rails 2.1.0 (Cannot upgrade for now due to several constraints) I am trying to achieve this. Any hints?
Now I want to 1. submit data for project, admin, supervisor and operator in a single project form 2. validate all and show errors on the project form.
Project has_many :projects_users ; has_many :users, :through => :projects_users
User has_many :projects_users ; has_many :projects, :through => :projects_users
ProjectsUser = :id integer, :user_id :integer, :project_id :integer
ProjectUser belongs_to :project, belongs_to :user
Admin < User # User has 'type:string' column for STI
Supervisor < User
Operator < User
Is the approach correct? Any and all suggestions are welcome.
I ended up using virtual attributes for admin, supervisor and operators everything else went through ORM associations