The table will be aliased, so your conditions need to be something
like :conditions => {‘users.name’ => ‘Cccc’, ‘aliased_users.name’ =>
‘Aaaa’}, :include (or :joins) =>…
It won’t actually be aliased_users, however I believe the naming
scheme for the aliases is deterministic, so just have a look at the
query generated to see what table aliases are being generated
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.