title: find array element
body: <p>I have an array</p>
  
  <pre><code>@words = Word.find_all_by_lesson_id(params[:id]) - @user.words
  </code></pre>
  
  <p>and want to find one element by word_id, something like</p>
  
  <pre><code>@current_word = @words[params[:id2].to_i]
  </code></pre>
  
  <p>where
  <code>params[:id2]</code> is <code>words.id</code></p>
  
  <p>Of course it's wrong, because the arrays index is not the same as <code>words.id</code>, 
  so how can I do it correct?</p>
  
  <p>OR</p>
  
  <p>can you advice me on how to work with the model if I want to exclude some records from it?</p>