I need (was ordered) to JOIN two tables by the CODE column (string). But the default (and the proper) way to join tables Product.joins(:skus)
is to do so through ID=TABLE_ID
What is the best to go about this situation and is there a way to do so without having to write:
Product.joins("INNER JOIN skus ON skus.CODE = products.CODE")