title: Dynamic bang finders in Rails 4
body: <p>Rails 4 is getting rid of dynamic finders, so</p>
  
  <pre><code>User.find_by_hash(hash)
  </code></pre>
  
  <p>becomes</p>
  
  <pre><code>User.where(hash: hash) # .first
  </code></pre>
  
  <p>Okay, not a big deal. But what is the best way to deal do with dynamic bang finders like <code>User.find_by_hash!(hash)</code> since there is no <code>where!()</code> method? <a href="http://edgeguides.rubyonrails.org/4_0_release_notes.html" rel="nofollow">Rails 4 Release Notes</a> conveniently avoid this.</p>
  
  <p><strong>Update</strong>: It plainly says: "All dynamic methods EXCEPT for find_by_... and find_by_...! are deprecated."</p>
  
  <p>Either the pages has changed since or I was blind when reading it.</p>