title: Ruby/Rails return with result if function call is returning something
body: <p>Please forgive me if this is something beginner level. I'm looking for a cleaner way of doing something like this,</p>
  <pre class="lang-rb prettyprint-override"><code>def function
    return Books.all if Books.any?
    
    return BooksForeign.all if BooksForeign.any?
  
    nil
  end
  </code></pre>
  <p>Since I'm basically duplicating the call, I was wondering if there's a simple and better way of doing this. I just want to return if there's anything returning with <code>Books</code> method or <code>BooksForeign</code> method as the method which expects a return doesn't care if it's Foreign Books or Not.</p>