Need help on relationships between resources

I have started with Rails now, and I find difficult to understand the
creation of relationship between two resources.

Enquiry_Resource

  • id
  • dAte
  • CustomerID
  • ProductID

Customer_Resource

  • id (customerID that is in Enquiry_REsource)
  • Name
  • Address

Product_Resource

  • id (mentioned in EnquiryResource)
  • name
  • Price

Now how do i link these while creating resources. and how will i query
the
data like if I want to display

enquriyid, date, customer name, product name.

Any help would be appreciated!!

Cheers!
Deepak

On Fri, Dec 21, 2012 at 5:29 AM, Deepak Dhananjaya
[email protected] wrote:

I have started with Rails now, and I find difficult to understand the
creation of relationship between two resources.

Please show your code.