'on' option to joins in squeel

449 Views Asked by At

Is there a way to add "on" conditions to a joins in Squeel. If not, are there other alternate options to accomplish the same?

If you want to override Rails default join mappings, you can do it using Arel on(). Is there an equivalent call in Squeel to accomplish the same?

Thanks.

1

There are 1 best solutions below

0
On

I'm afraid there's no way in Squeel to add the custom join conditions without actually assigning them as part of the association you're using. If you could show me a use case (use GitHub issues or e-mail!) I could see about getting this worked in for 1.0, but generally it's sufficient to add the conditions to the where clause.