title: Using ActiveRecord's scope instruction to return a single result
body: <p>I have the following class that works fine in my unit tests but I feel it could be simpler.</p>
  
  <pre><code>class License &lt; ActiveRecord::Base
    scope :active, lambda {
      where("active_from &lt;= ?", Date.today).order("version_number DESC")
    }
  end
  
  def current_license
    return License.active.first
  end
  
  public :current_license
  </code></pre>
  
  <p>I have tried appending the <code>.first</code> into the <code>lambda</code> clause but that causes an error.</p>
  
  <p>How do I tell the <code>scope</code> I only want the first result, and thus eliminate the method <code>current_license</code> completely?</p>