README.md in enum_ish-1.3.3 vs README.md in enum_ish-1.4.0
- old
+ new
@@ -119,10 +119,25 @@
user.status = 'enable'
user.status_enable? #=> true
user.status_disable? #=> false
```
+Without prefix:
+
+```ruby
+class User
+ extend EnumIsh
+ attr_accessor :status
+ enum_ish :status, ['enable', 'disable'], predicate: { prefix: false }
+end
+
+user = User.new
+user.status = 'enable'
+user.enable? #=> true
+user.disable? #=> false
+```
+
### Accessor
Generate getter and setter for aliased symbols instead of raw values:
```ruby
@@ -162,9 +177,10 @@
extend EnumIsh
enum_ish :status, ['enable', 'disable'], scope: true
end
User.with_status(:enable) #=> SELECT "users".* FROM "users" WHERE "users"."status" = "enable"
+User.with_status_not(:enable) #=> SELECT "users".* FROM "users" WHERE "users"."status" != 'enable'
```
#### Validation
Generate validation: