ernie/squeel — Issue #82: Join and meta_search in Rails 3.1 - unknown class: Squeel::Nodes::Join
Author: tanelj
Created: 2011-11-24 15:14:40+00:00
State: open

Hi!

I have poblem when using Squeel (0.9.3) and joins with meta_search (1.1.1) in Rails 3.1.1. When using search it gives a error:

RuntimeError: unknown class: Squeel::Nodes::Join

For example this query:

MachineLog.joins{employee}.select(:from).search

returns:

RuntimeError: unknown class: Squeel::Nodes::Stub
./gems/meta_search-1.1.1/lib/meta_search/builder.rb:279:in `build_join_dependency'
./gems/activesupport-3.1.1/lib/active_support/core_ext/enumerable.rb:26:in `group_by'

Or this query:

MachineLog.joins{employee.outer}.select(:from).search

returns:

RuntimeError: unknown class: Squeel::Nodes::Join
./gems/meta_search-1.1.1/lib/meta_search/builder.rb:279:in `build_join_dependency'
./gems/activesupport-3.1.1/lib/active_support/core_ext/enumerable.rb:26:in `group_by'

Without Squeel it works just fine:

MachineLog.joins(:employee).select(:from).search