Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'on' option to joins in squeel

Tags:

squeel

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.

like image 771
ssr Avatar asked Jan 29 '12 17:01

ssr


1 Answers

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.

like image 90
Ernie Avatar answered Nov 14 '22 14:11

Ernie