title: Rails model scope and group
body: <p>I would like to get all users that have a registration stage of 1, 2, 3, 4, 5, or 6 and then group them in registration stages.</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
  
      scope :incomplete_onboarding, -&gt; { where(registration_stage: [1, 2, 3, 4, 5]).group('registration_stage') }
  
  end
  </code></pre>