Yes, works a treat. thanks for yuor help. JB
On Jan 29, 5:26 pm, Kenny Ortmann <[email protected]> wrote: > I didn't try this myself but give it a shot, > > config.columns[virtual_field].includes = {:parent => {:grandparent => > :greatgrandfather}} > > I'm assuming that in your example 'virtual_field' is a field on grandparent > correct? > > On Thu, Jan 29, 2009 at 8:10 AM, johnnybutler7 <[email protected]>wrote: > > > > > Hi, > > > I know how to sort on child.parent.grandparent virtual columns > > > config.columns[virtual_field].includes = {:parent => :grandparent} > > config.columns[:customer_name].includes = {:site => :customer} > > > config.columns[:customer_name].sort_by :sql => 'customers.name' > > > can anyone think of an easy way to sort on a greatgrandparent? > > > child.parent.grandparent.greatgrandparent > > > JB --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
