Hi
I have to create a request for an organization and also to create a
request for many Contacts..Now what I do is treating all these in a
single table say request and it has all the fields like
organization_name, contact_name etc Here company_name is at atime one
for a request but contacts are more than one say primary_contacts,other
contacts etc..what my question I tried here a polymorphic relation here
like
class request <ActiveRecord
  belongs_to :request,:ploymorphic=>true
end
class Organization <ActiveRecord
  has_one :request,:as=>:request
end
class Contact <ActiveRecord
  has_one :request,:as=>:request
end

    But I think this not correct since it makes sense like
orgnization.request  and
contact.requests

          But what I need is the reverse way..(Am I right?)..Please help
to properly arrange this

Thanks in advance
Sijo
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to