title: find_by_id(params[:subject_id]) vs where(:id => params[:subject_id]).first
body: <p>I'm new to rails. Just wondering which is the better approach that will return nil if the subject_id can't be found:</p>
  
  <pre><code>@subject = Subject.find_by_id(params[:subject_id])
  </code></pre>
  
  <p>or</p>
  
  <pre><code>@subject = Subject.where(:id =&gt; params[:subject_id]).first
  </code></pre>
  
  <p>Thanks.</p>