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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit groups.google.com/d/msg/rubyonrails-talk/-/ihBCU3EpqvAJ. For more options, visit groups.google.com/groups/opt_out.
tamouse mailing lists
2012-Dec-22 13:55 UTC
Re: Need help on relationships between resources
On Fri, Dec 21, 2012 at 5:29 AM, Deepak Dhananjaya <deepak.dhananjaya-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have started with Rails now, and I find difficult to understand the > creation of relationship between two resources.Please show your code. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit groups.google.com/groups/opt_out.