Hi experts, I am new to rails and am struggling for several days with a following model (Rails 2.2.2).
People are submitting requests, each request has one submitter, one approver, several reviewers and several responsible people. I was able to get this model working: class Person < ActiveRecord::Base has_many :Requests end class Request < ActiveRecord::Base belongs_to :Approver, :class_name => "Person", :foreign_key => "approver_id" belongs_to :Submitter, :class_name => "Person", :foreign_key => "submitter_id" end But I am really stuck in creating HABTM relationship between requests<->reviewers and requests<->responsible_people.. I do not want to create separate tables for each group of people as one is sometimes submitter/approver and sometimes belongs to reviewers/responsible. Can you someone point me the right direction? Thanks! JetPac --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---