Skip to content
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

Titleize the column not the user defined locale #2280

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

jsntv200
Copy link
Contributor

Solves #2014

Ran into this problem when I wanted to render a column with ID in the name. Assumed defining the label in a locale would resolve the issue but no joy.

Overriding a template to display a user defined locale seemed like overkill when it appears that titleize is incorrectly applied for the collection partial. Existing usage in other partials/templates is to titleize the column rather than the result of translate.

https://github.com/thoughtbot/administrate/blob/main/app/views/administrate/application/new.html.erb#L19
https://github.com/thoughtbot/administrate/blob/main/app/views/fields/has_one/_form.html.erb#L21
https://github.com/thoughtbot/administrate/blob/main/app/views/fields/has_one/_show.html.erb#L32

@pablobm pablobm merged commit b930ebd into thoughtbot:main Nov 15, 2022
@pablobm
Copy link
Collaborator

pablobm commented Nov 15, 2022

I agree that the titleize is incorrectly applied. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants