ernie/meta_search — Issue #76: "Cannot visit MetaWhere::JoinType" when using outer join
Author: bostrom
Created: 2011-11-24 12:22:25+00:00
State: open

I've got this has_many :through association (items possibly contained in one or more folders) and as base for the MetaSearch I'd like to use all items that do not belong to any folders.

Let's say my tables are items, items_folders and folders, where items_folders is the join table that associates items to folders. Now I get all items not belonging to any folders using MetaWhere:

Item.joins(:items_folders.outer).where(:items_folders => {:folder_id => nil})

However, when using .search on this relation, I get an error saying "Cannot visit MetaWhere::JoinType". What does this mean?

Am I doing something fundamentally wrong here, or what?