jamesgolick/friendly — Issue #31: Possible to combine scopes with custom conditions?
Author: dhruvg
Created: 2011-11-03 06:01:39+00:00
State: open

I am trying to follow the tutorial for named scopes, but I can't get past this point:

Post.by_james.all(:author => "Steve")

When I try to emulate that, I get a MissingIndex error:

Foo.all(:baz => 1) works!
Foo.scope1.all works!

Foo.scope1.all(:baz => 1) fails with a MissingIndex error:
Friendly::MissingIndex: No index found to satisfy: #1}, @page=1, @per_page=nil, @limit=nil, @offset=nil, @order=#:created_at, @descending=>true, @nulls=>nil>, @preserve_order=nil>

What am I missing?