title: In Rails, execute block for both conditions: first_or_create
body: <p>Anybody know a Rails method that will allow me to look for an existing record or create a new one AND execute a subsequent block of code?</p>
  
  <p>Example:</p>
  
  <pre><code>Model.where(parameters).first_or_create do |m|
    # execute this regardless of whether record exists or not
  end
  </code></pre>
  
  <p>Similarly, the method <code>find_or_create_by</code> does not execute a block in either scenario.</p>
  
  <p>I could use <code>if-else</code> statements but that will duplicate my code...</p>