When an enum attribute is defined on a model, Rails adds some default scopes to filter records based on values of enum on enum field.
Here is how enum scope can be used.
In Rails 6, negative scopes are added on the enum values.
As mentioned by DHH in the pull request,
these negative scopes are convenient when you want to disallow access in controllers
Here is how they can be used.
Check out the pull request for more details on this.