Find file
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (34 sloc) 2.38 KB

Scopes Revisited

Trying to find better ways to implement scopes in Active Record.

See for the actual merge with Rails.


  • Make scope stack merging more transparent (ie. not in a method with 5-level-deep nested if statements)
  • Make scopes thread-safe
  • Re-evaluate method and variable naming


  • Merge scope stacks as late as possible to enable smarter merging
  • Delegate and federate stack merging (ie. Scopes don't need to know how associations merge their query parameters)



  • Start merging the new scope implementation into Rails and get some simple queries running