First page Back Continue Last page Overview Text


Then you just filter the joined dataset to only include rows where the client's firm_id is the same as the primary key of the current firm instance. That's all it takes.

Now, ActiveRecord does support custom associations.

However, it requires you to hand code the entire SQL string for the association, which is ugly and a pain in general.

What's worse than that is that ActiveRecord can't eagerly load custom associations.