title: Rails ActiveRecord 4: correct way to write a greater than
body: <p>I know that</p>
  
  <pre><code>Object.where('key &gt; ?', value) 
  </code></pre>
  
  <p>works.</p>
  
  <p>But if the query happens to have several tables involved, with multiple <code>key</code> columns, it <em>might</em> break as the query produced is:</p>
  
  <pre><code>SELECT "tablename".* FROM "tablename"  WHERE "tablename"."user_id" = $1 AND (key &gt; 0)  [["user_id", 29]]
  </code></pre>
  
  <p>A solution would be</p>
  
  <pre><code>Object.where('tablename.key &gt; ?', value) 
  </code></pre>
  
  <p>But ain't there an arel way to write this instead? My app has (enforced) weird table names, I'd rather not write them there and that they get added dynamically by active record.</p>
  
  <p>Thanks</p>