0

I'm trying to render a view on form submit. Say I have a form, which is supposed to act as a filter. I'm rendering the form in a view and when the user hits submit, I want to re render (or perhaps render another view) with a collection of models that fit that filter. Such as they search for "ABC", I want a collection of all models that have ABC in the title.

Basically my question is, how to I fetch a collection in a view and render a 'subview' that would contain the contents of the collection?

avoliva
  • 3,181
  • 5
  • 23
  • 37
  • Factor a router into your solution. Try not to think only in collections and views. – Scott Puleo May 07 '13 at 11:07
  • 2
    You can initially render a subview with a empty collection.Later just reset the collection with new models u get by filtering.Make sure u listen to reset event of collection inside subview and call its render method on reset – deven98602 May 07 '13 at 13:04

0 Answers0