title: Ruby on Rails 3 howto make 'OR' condition
body: <p>I need an SQL statement that check if one condition is satisfied:</p>
  
  <pre><code>SELECT * FROM my_table WHERE my_table.x=1 OR my_table.y=1
  </code></pre>
  
  <p>I want to do this the 'Rails 3' way. I was looking for something like:</p>
  
  <pre><code>Account.where(:id =&gt; 1).or.where(:id =&gt; 2)
  </code></pre>
  
  <p>I know that I can always fallback to sql or a conditions string. However, in my experience this often leads to chaos when combining scopes. What is the best way to do this?</p>
  
  <p>Another related question, is how can describe relationship that depends on an OR condition. The only way I found:</p>
  
  <pre><code>has_many :my_thing, :class_name =&gt; "MyTable",  :finder_sql =&gt; 'SELECT my_tables.* ' + 'FROM my_tables ' +
  'WHERE my_tables.payer_id = #{id} OR my_tables.payee_id = #{id}'
  </code></pre>
  
  <p>However, these again breaks when used in combinations. IS there a better way to specify this?</p>