title: Create scopes using instance methods best way
body: <p>I was wondering what's the best way to make an scope using an instance method to filter records. This is my model:</p>
  
  <pre><code>class Promotion &lt; ActiveRecord::Base
  
    scope :availables, lambda{ all.select{ |obj| obj.is_available? } }
  
    def is_available?
      Date.today &lt;= Date.strptime(valid_thru, '%m/%d/%Y')
      ...more validations here
    end
  end
  </code></pre>
  
  <p>The problem here is this scope returns an array instead of an ActiveRecord::Relation and I'm not able to chain other scopes.</p>
  
  <p>Any suggestion guys?</p>