title: Proper use of Sequel's save()? How to create new or update existing records?
body: <p>The Sequel gem has a <code>save</code> method that "creates or updates the record". I'm trying to use it for creating a new record, when one doesn't exist, or updating fields for existing records:</p>
  
  <pre><code>record = Records.where(:name =&gt; 'Dark Side of the Moon').first
  record.save(:artist =&gt; "Pink Floyd")
  </code></pre>
  
  <p>This fails, because <code>Records.where(:name =&gt; 'Dark Side of the Moon')</code> returns nil, not an empty Record object. Essentially, I'm using this method as an <code>upsert</code>, and it doesn't work this way, since the <code>save</code> method is a model instance method.</p>
  
  <p>My question is twofold: (1) what's the correct way of using <code>save</code>, and (2) does Sequel have a way of "upserting" records? </p>