more workarounds for rails joins in scopes problems