title: how to assign table aliases through activerecord
body: <p>I am trying to use ActiveRecord to access a table in a different database.  the normal sql would look something like</p>
  
  <pre><code>select * from users, group_users@db2
  where users.id = group_users.user_id
  and group_users.group_id = 1
  </code></pre>
  
  <p>I've tried adding the @db2 to the table name in the class file</p>
  
  <p><code>self.table_name = 'group_users@db2'</code></p>
  
  <p>but of course that causes issues in the "where" clause as it puts</p>
  
  <pre><code>where users.id = group_users@db2.user_id
  </code></pre>
  
  <p>so I was looking for a way to alias the table_name attribute, that way</p>
  
  <pre><code>select * from users, group_users@db2 gu
  where users.id = gu.user_id
  and group_users.group_id = 1
  </code></pre>