/merge_join_test

Rails app demoing a limit in merging to a scope that includes a join.

Primary LanguageRuby

== Welcome to a simple multi-association scope merge join test

This app demos a limitation on merging a scope that includes a join across a
second association.

```
rake db:migrate
rails c
  Parent.test_scope.to_sql
```

Raises an exception:

  ActiveRecord::ConfigurationError: Association named 'grandchildren'
  was not found; perhaps you misspelled it?

I think this means that AR (or Squeel, I'm not sure), is trying to find the
'grandchildren' association on the Parent model.