rails3 joins https://hai3.net/blog/rails3-joins/