README.md in str_enum-0.1.2 vs README.md in str_enum-0.1.3
- old
+ new
@@ -67,23 +67,23 @@
class User < ActiveRecord::Base
str_enum :status, [:active, :archived], scopes: false, validate: false, accessor_methods: false
end
```
-Prevent method name collisions with the `prefix` option.
+Prevent method name collisions with the `prefix` and `suffix` options.
```ruby
class User < ActiveRecord::Base
- str_enum :address_status, [:active, :archived], prefix: :address
+ str_enum :address_status, [:active, :archived], suffix: :address
end
# scopes
-User.address_active
-User.address_archived
+User.active_address
+User.archived_address
# accessor methods
-user.address_active?
-user.address_archived?
+user.active_address?
+user.archived_address?
```
## History
View the [changelog](https://github.com/ankane/str_enum/blob/master/CHANGELOG.md)