title: wrong number of arguments (given 0, expected 1) - Ruby
body: <p>In my user model i've got this code:</p>
  
  <pre><code>def job_amount(user)
    parent = Parent.where(parents: {firstname: user.firstname, name: user.name})
    demands = Demand.where(parent_id: parent.pluck(:id))
    demands.sum(:quantity)
  end
  </code></pre>
  
  <p>calling this:</p>
  
  <pre><code>&lt;%= @user.job_amount.to_s %&gt;
  </code></pre>
  
  <p>raises the following error:</p>
  
  <pre><code>wrong number of arguments (given 0, expected 1)
  </code></pre>
  
  <p>any ideas why?</p>