 <p>Two notes: such more complex query conditions cannot be written using symbols, you have to use string notation instead. And, secondly, a scope does not need to have a parameter, your <code>latest</code> scope is one of them, as you simply compare the <em>database</em> <code>created_at</code> time with the current time shifted by 5 days. So, the correct scope should be something like:</p> <pre><code>scope :latest, -&gt; { where("created_at &gt;= ?", Time.now - 5.days) } </code></pre> <p>and you call it simply:</p> <pre><code>@workers = Worker.company_id(@company.id).latest </code></pre>