{"id":18401889,"url":"https://github.com/dhyegocalota/active_record-humanized_enum","last_synced_at":"2025-04-07T07:31:51.734Z","repository":{"id":62552829,"uuid":"106022029","full_name":"dhyegocalota/active_record-humanized_enum","owner":"dhyegocalota","description":"Easily translate your Active Record's enums. :speech_balloon:","archived":false,"fork":false,"pushed_at":"2022-09-28T12:09:37.000Z","size":10,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T11:01:53.835Z","etag":null,"topics":["activerecord","enum","i18n","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhyegocalota.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-06T15:42:41.000Z","updated_at":"2023-02-09T08:27:28.000Z","dependencies_parsed_at":"2022-11-03T04:01:09.096Z","dependency_job_id":null,"html_url":"https://github.com/dhyegocalota/active_record-humanized_enum","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhyegocalota%2Factive_record-humanized_enum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhyegocalota%2Factive_record-humanized_enum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhyegocalota%2Factive_record-humanized_enum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhyegocalota%2Factive_record-humanized_enum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhyegocalota","download_url":"https://codeload.github.com/dhyegocalota/active_record-humanized_enum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247612195,"owners_count":20966688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activerecord","enum","i18n","rails","ruby"],"created_at":"2024-11-06T02:40:21.600Z","updated_at":"2025-04-07T07:31:51.473Z","avatar_url":"https://github.com/dhyegocalota.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ActiveRecord Humanized Enum (I18n)\nEasily translate your Active Record\\'s enums.\n\n## Installation\nInclude to your Gemfile\n```ruby\ngem 'active_record-humanized_enum'\n```\n\n## Usage\n\n### ActiveRecord integration\nThe installation automatically self-includes in the ```ActiveRecord::Base```.\n\n### How to use\n1. Call the `enum` macro method just like you already do:\n```ruby\nclass User\n  enum status: [:enabled, :disabled]\nend\n```\n\n2. Translate the enums in your YML translation files:\n```yaml\npt-BR:\n  activerecord:\n    attributes:\n      user:\n        status: Estado\n        statuses:\n          enabled: Ativo\n          disabled: Inativo\n```\n\n3. Will be available the following methods:\n```ruby\nUser.humanized_status(:enabled) # Ativo\nUser.humanized_status(:disabled) # Inativo\n\nuser = User.first\nputs user.status # enabled\nputs user.humanized_status # Ativo\n\nuser.status = :disabled\nputs user.humanized_status # Inativo\n```\n\n## Related Projects\n- [Integration with ActiveAdmin](http://github.com/dhyegocalota/active_admin-humanized_enum)\n\n## Maintainer\n[Dhyego Fernando](https://github.com/dhyegocalota)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhyegocalota%2Factive_record-humanized_enum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhyegocalota%2Factive_record-humanized_enum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhyegocalota%2Factive_record-humanized_enum/lists"}