Use your AR::Record association keypaths in your sql queries; forget about rails association aliases foobar.