SQL/Model for Customers Who Bought This Item Also Bought

i searched on "rails +collaborative +filtering" and didn't find much,
but there are lots of papers on methodology.