Apologies - managed to figure out how to work it, I changed the controller to be - @version = Version.finished_versions.apply_scopes(:search => [params[:search])
and the search function works - current problem i'm having is choosing a table column field to search from - it needs to be the parent name. i.e versions belong_to application - and it is the application name that I need to search from in the above..... Thanks again for your help On May 19, 6:07 pm, kevinpfromnm <[email protected]> wrote: > First, would take your filter there and put it in a named scope. > > named_scope finished_versions, { :joins => :status, :conditions => > { :statuses => { :name => 'Finished' }}, :order => > 'versions.created_at } > > then just need > > @version.finished_versions.apply_scopes( :search => ... > > On May 19, 2:38 am, Pete <[email protected]> wrote: > > > > > > > I have a <table-plus> defined on a separate page, with conditions > > applied within, i.e. My controller contains: > > > @version = Version.find(:all, :joins => :status, :conditions => > > { :statuses => {:name => 'Finished'}}, :order => 'versions.created_at > > DESC', :limit => 50) > > > and the dryml code - > > > <table-plus with="&@version" fields="application, application.owner, > > created_at" without-search-form> > > <empty-message:>There are no applications</empty-message:> > > > </table-plus> > > > This works fine as is......... > > > I need the :conditions to be applied, but I also want to be able to > > search the table - sorting is not soo important, but I really want to > > implement the Search function, but do not know how to implement > > apply_scopes in this context, and cannot find any combined examples > > such as this? > > > -- > > You received this message because you are subscribed to the Google Groups > > "Hobo Users" 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 > > athttp://groups.google.com/group/hobousers?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Hobo Users" 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 > athttp://groups.google.com/group/hobousers?hl=en.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
