#116 new
Tim Lowrimore

combining alias_scopes with _OR_

Reported by Tim Lowrimore | November 24th, 2009 @ 04:26 PM

Let's say I have two scopes defined using scope_procedure:


User.scope_procedure :awesome_users, lambda {
    User.hawaiian_shirt_is_null_or_neck_beard_is(true)
}

User.scope_procedure :responsible_users, lambda {
    User.first_name_is("Bob").age_gte(50).eats_corn_on_the_cob_is(false)
}

I'd like to be able to combine these newly defined scopes with an OR like this:


User.awesome_users_or_responsible_users

But when I do this, I get the following error message:

Searchlogic::NamedScopes::OrConditions::UnknownConditionError: The condition 'responsible_users' is not a valid condition, we could not find any scopes that match this.

Is this intended? Am I doing something wrong?

Best Regards,
Tim

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

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

Provides common named scopes and object based searching.

People watching this ticket

Pages