title: get session id from another table
body: <p>I have 3 tables--answers, questions and tokens.</p>
  
  <p>IN <code>tokens</code> I have <code>id, token, created_at, updated_at</code>.</p>
  
  <p>IN <code>answers</code> i have <code>id, token (id), text, created_at, updated_at</code></p>
  
  <p>In <code>questions</code> - <code>id, text</code></p>
  
  <p>How can I get ID (from tokens) ? I do this way:</p>
  
  <pre><code>result=Answer.create(:question_id=&gt;question.id,:token=&gt;session[:token],:text=&gt;params["answer_"+question.id.to_s])
  </code></pre>
  
  <p>I don't want <code>session[:token]</code>, it's pasted in table TOKENS (for example 23709274092107hdjshdsj) and I </p>
  
  <blockquote>
    <p>just need ID!</p>
  </blockquote>