title: SQL Rails rescue request for non existing user
body: <p>I have small problem. Lets say I have <code>users</code> 1, 2 and 4. And now I'm trying to use this query:</p>
  
  <pre><code>User.select(:channel).where(:id =&gt; rand(1..User.count)).first.channel
  </code></pre>
  
  <p>Which in this case works like this:</p>
  
  <pre><code>User.select(:channel).where(:id =&gt; rand(1..3)).first.channel
  </code></pre>
  
  <p>And well, thats my problem. I can select <code>user 1</code> and <code>user 2</code>. <code>User 4</code> is unreachable. And if it try to take <code>user 3</code> it returns me that there is no <code>.channel</code> method, because everything is <code>nil</code> then... What should I do so it could reach <code>users</code> 1, 2, 4 and ignore <code>user 3</code> which is <code>nil</code>?</p>