Permalink
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 http://github.com/Manfred/rails/tree/scopes for the actual merge with Rails.

Objectives

  • 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

Ideas

  • 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)

TODO

DONE

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