README.md in str_enum-0.3.0 vs README.md in str_enum-0.4.0
- old
+ new
@@ -76,19 +76,22 @@
<%= f.select :status, User.statuses.map { |s| [s.titleize, s] } %>
```
## Options
-Choose which features you want with:
+Choose which features you want with (default values shown):
```ruby
class User < ActiveRecord::Base
str_enum :status, [:active, :archived],
- scopes: false,
- validate: false,
- accessor_methods: false,
- update_methods: false,
- default: nil
+ accessor_methods: true,
+ allow_nil: false,
+ default: true,
+ prefix: false,
+ scopes: true,
+ suffix: false,
+ update_methods: true,
+ validate: true
end
```
Prevent method name collisions with the `prefix` and `suffix` options.