On 29 March 2010 11:33, Nipuna Weerasinghe <[email protected]> wrote: > Hi, > > I have a controllers called x and y. I want to search and display "y" > tables data using X's primary key, this key is a foreign key for Y.
That does not make sense to me unless you mean that the id field in xs table is the same as the id field in ys table. In that case why not just combine the tables? Probably I do not understand exactly what you mean. Is so please give the relationships between the models (has_many, belongs to etc) Colin > > eg- > > when I click "show " option in the X table's index , I want to display > X's data and Y's data those are relavant to the X's primary key.( need > to display all in one form). > > I would appreciate very much if any one can guide me or give me a link > to find the answer for this. > > Many 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. > > -- 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.

