This project is archived and is in readonly mode.

#4583 ✓resolved
David Chelimsky

Merge default scopes by default

Reported by David Chelimsky | May 12th, 2010 @ 02:01 PM | in 3.0.2

I just co-authored a merged_default_scopes gem (AR plugin) with Brian Tatnall. It modifies the behavior of default_scope so that it merges the arguments of successive calls. We needed this in an app that was using a plugin that used default_scope and also needed to add to the default scope in the consuming model.

We think this should be the default behavior.

If you agree, we'd be glad to submit a patch, including a clear_default_scope method so that anybody counting on the current behavior to reset the default scope still has a way to accomplish that.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages