Skip to content

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