Hi all, I am trying to implement the search across models. But i could not able to do this. let me tell you my application details: i have tables like: 1)containerformats : contains the streamnames 2)transportstreams : have how many programs are there in each stream of containerformattable and has containerformat_id as one column 3)programs: have how many video and audio streams are there in each program and has transportstream_id as one column 4)streams : which will have the video and audio stream parametes and it has all other table ids like: transportstream_id containerformat_id program_id and i have association like: containerformats has_many:transportstreams transportstreams has_many:programs programs has_many:streams streams belongs_to :all above tables I have cretaed a search controller to implement the search: now here my sample querie i want to implement in my search controller. find streams from containerformats has number of programs = 1(which is from transportstreams table) and nummberof videos =1 (which is from programs table) and resolution ="720x480"(which is from streams table) the above query i could able to write and test in mysql prompt. But if i try to implement this i could not able to do this. Can you suggest me how exactly the code looks like to search the data from a table based on other table parametrs selected? suggest me if iam doing any mistake while assigning associatioons. Any help would be appreciated. thanks Srikanth --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---