Colin Law wrote:
> On 29 March 2010 23:44, Nipuna Weerasinghe <[email protected]> wrote:
>>
>>
>> Hi,
>>
>> I didn't mean both controllers reprecenting the same data, I meaned X's
>> primary key is a foreing key in Y. need to seach both tables at onces
>> and display both tables record in a form.
>
> Could you insert your comments after the relevant part of the mail you
> are responding to please, it is easier to follow the thread then.
> Thanks
>
> I think we had better start again, show me the relationships you have
> defined between your models, such as
> x has many y, y belongs to x, or whatever it is, and what fields are
> in the tables (just the important ones)
>
> Colin
Hi Colin,
Thanks for keeping in touch.
eg - order tabel- order id, desc, date, ....
item table- itemno,name,price,oder id...
order id is common for both table, that is the link. One order has one
or more items.
want to show relevant item/s details (relevant to particular order)
when I click the show button in the order index form. I want to display
both order and relevant item/s data in one form.
Thanks.
--
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 [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.