TribeHR/ad_hoc_reporting — pull request #15 by ianring (2013-07-10 18:37:22+00:00)
Title: Add dynamic binding of models that aren't bound by the schema

This does what it needs to do. Is it a sane approach?

The "model whitelist" defines what models are to be included as report bases, and also defines what models are allowed to be associated with them, as a child array.
The problem being addressed here is: some models aren't actually associated with a bindModel relationship like "hasOne" or "belongsTo" to the one being reported on yet we want them to be associated in the report.

This change will bind a "belongsTo" dynamic binding if one doesn't exist, for each of the associated models defined in the model whitelist.