# Enummer
[](https://rubygems.org/gems/enummer)
[](https://app.codecov.io/gh/shkm/enummer)
[](https://github.com/shkm/enummer/blob/main/MIT-LICENSE)
[](https://www.rubydoc.info/github/shkm/enummer/main)
Enummer is a lightweight answer for adding enums with multiple values to Rails, with a similar syntax to Rails' built-in `enum`.
Enummer officially supports Ruby versions 2.7, 3.0 and 3.1 with SQLite, PostgreSQL, and MariaDB.
## Installation
Add `gem "enummer"` to your Gemfile and `bundle`.
## Usage
### Setup
Create a migration for an integer that looks something like this:
```ruby
class CreateUsers < ActiveRecord::Migration[7.0]
def change
create_table :users do |t|
t.integer :permissions, default: 0, null: false
end
end
end
```
Now set up enummer with the available values in your model:
```ruby
enummer permissions: %i[read write execute]
```
### Scopes
Scopes will now be provided for `