Hello,

Imagine that I have the two following models :
class A < ActiveRecord::Base
belongs_to :b, :foreign => :fkey
end

class B < ActiveRecord::Base
end

Is it possible to retrieve both classes A and B and that column fkey
is pointing to table B ? In other words, if I give :a and :fkey, how
to obtain the class A and the fact that 'fkey' is a foreign key
pointing to table 'B' ?
I am almost sure that AR can do that, but this is not well-documented,
and source-code is a bit obsucated...

Thank you in advance,
Pierre L.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to