not without rolling your own or tweaking how apply_scopes works.  If
it's something relatively simple, I'd just add another named_scope for
it (you'll need to do it as a lambda if you're passing information to
it though).

On May 20, 2:18 pm, Pete <[email protected]> wrote:
> Don't worry, it helped me get what I wanted - thank you very much,
>
> Do you have any ideas on how to use search on column headings that
> live outside the defined scope?
>
> i.e. versions, belongs to application - my finished versions table
> includes a column with application_name - but I do not seem to be able
> to search under this parameter, as the sql table does not contain,
> version_application_name - only application_id.
>
> Is there any way of searching under a column name outside of the named
> scope?
>
> On May 20, 6:23 pm, kevinpfromnm <[email protected]> wrote:
>
>
>
> > sorry about that, was my bad.  what happens when you give advice
> > without being fully awake.
>
> > On May 20, 3:28 am, Pete <[email protected]> wrote:
>
> > > 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.-Hidequotedtext -
>
> > > > - 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 
> > > 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 
> 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 at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to