Is it possible to do an "OR" on two scopes?
For example, consider a simple example where I have a class User with 2 scopes - professors and lecturers
Then, can I re-use the 2 scopes to get users who may be either professors or lecturers? Some thing like User.professors.or.lecturers
Metawhere allows you write conditions inside scopes as a Ruby statements it doesn't have any influence on scopes. Since (and unfortunately) in Rails scopes are joined (AFAIK) using only
ANDyou can't achieve what you want. Possible solution of the problem is new scopeproffesors_or_lecturersalso check this question