See this ticket.... https://hobo.lighthouseapp.com/projects/8324/tickets/142-search-doesn-t-work-properly-with-has_many-through
Maybe Tom or Bryan can make a suggestion for near term... -Owen On Sep 15, 5:38 pm, Owen <[email protected]> wrote: > This is an enhancement to Hobo that has been requested, but not yet > implemented. I think Bryan was looking at it..... > > On Sep 15, 1:38 pm, kevinpfromnm <[email protected]> wrote: > > > I don't believe the automatic scopes handles searching across joined > > tables. You pretty much have to roll your own or use something like > > acts_as_ferret or acts_as_solr. > > > On Sep 15, 3:20 am, Venka Ashtakala <[email protected]> wrote: > > > > I am trying to develop an index page that has the ability to search, > > > and this is my controller code: > > > > hobo_index Project.visible.apply_scopes(:search => [params > > > [:search], :applicant, :regional_grant_manager], :order_by => > > > parse_sort_param > > > (:applicant, :program, :due_date,:regional_grant_manager, :state, > > > :grant_writer) ) > > > > however, when I try to do a search, this code breaks since it thinks > > > that all the search columns are on the Projects table, while the > > > regional_grant_manager is actually in another table. Is there a way > > > to tell Hobo/rails that the regional_grant_manager table needs to be > > > joined to the resulting SQL query, I tried to use a :join => > > > [ "regional_grant_manager" ] but that didn't work. > > > > Any help would be appreciated. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
