Generated scopes for ActiveRecord classes