We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to write something like:
class Filter include ActiveAttr::Model attribute :status, default: :all, enum: [:all, :available, :unavailable] end
This would give us:
Filter#status_name
Filter#status
Filtet#status_hashes
There's simple_enum and similar, but those seem to be tight to AR.
The implementation is pretty straightforward (for AR-only). This is what I'm currently using which may be a good start.
The text was updated successfully, but these errors were encountered:
This should be revisited with Enums now being added to Rails 4.1
Sorry, something went wrong.
No branches or pull requests
Ability to write something like:
This would give us:
Filter#status_name
that is i8n translated based on the value ofFilter#status
.Filtet#status_hashes
- the hash that can be used on the views.There's simple_enum and similar, but those seem to be tight to AR.
The implementation is pretty straightforward (for AR-only). This is what I'm currently using which may be a good start.
The text was updated successfully, but these errors were encountered: