Skip to content

Instantly share code, notes, and snippets.

@stve
Forked from actsasflinn/Composite Named Scope
Created December 1, 2009 02:21
Show Gist options
  • Save stve/246004 to your computer and use it in GitHub Desktop.
Save stve/246004 to your computer and use it in GitHub Desktop.
scopes[:your_composite_scope_name] = proc{ Scope.new(your.combined.scopes.here, {}) }
def self.your_composite_scope_name(*args)
scopes[:your_composite_scope_name].call(self, *args)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment