-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
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
Don't mark check boxes in collections when using I18n translations #971
Comments
I tried a workaround replacing the translation in the simple_form.pt.yml for a label_method: (lambda { |obj| t("#{obj}") }) and worked. |
@jonathanrz there's a bug indeed. Thank you for reporting it! |
Thank you for your quick answer. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Collection: ROLES_FORM = [:supervisor, :treasurer, :secretary]
input: <%= u.input :roles_form, collection: User::ROLES_FORM, as: :check_boxes %>
Translation(pt):
options:
user:
roles_form:
supervisor: "Supervisor"
treasurer: "Tesoureiro"
secretary: "Secretário"
When editing the model, without the translations the check boxes came checked exactly as the options, but after I translated, simple_form isn't checking they anymore. The form submition is working fine.
The text was updated successfully, but these errors were encountered: