A simple example for illustration, this is not actually what I'm trying to do:
I have two scopes on a user model:
scope :unarchived, -> { where archived: false }
scope :active, -> { where active: true }
For convenience and dryness, I want a scope called :awake that is the combination of User.unarchived.active written in the stabby lambda notation. NOTE, I know I can write something like this:
def self.awake
self.unarchived.active
end
I would like to know if and how this is possible inside a lambda scope definition and if not, I would appreciate an explanation or a link as to why it isn't.