Rails 6 adds negative scopes
for all enum values
Default methods added by Enum
Rails allows adding enum
Enums allow declaring attributes,
where the values map to integers in the database,
but can be queried by name.
Along with these,
Enum also add scope and query methods on the model:
These scopes though are limited to positive queries.
To fetch all inactive devices, or disabled devices,
we have to query like so:
Rails 6 has now added convenience methods,
to query the negative enum values.
This gives us the ability
to use a much cleaner syntax,
rather than querying using