forked from formtastic/formtastic
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better workaround for ActiveRecord's flawed Base.human_name:
* affecting commit buttons * in 0.9.6 and earlier we called @object.class.human_name, but this resulted in things like "Userpost" instead of "User post" * in 0.9.7 we called @object.class.name.underscore.humanize * 0.9.6 worked for people with their own i18n for model names (human_name falls back to "Userpost" if there's no i18n) * 0.9.7 worked for those without i18n ("User post" instead of "Userpost") * the crappy fallback in human_name is the issue we're routing around (@object.class.name.humanize) * so we now call @object.class.name.underscore.humanize only if it looks like human_name has fallen back to the crappy @object.class.name.humanize
- Loading branch information
1 parent
511509c
commit 6ca9d44
Showing
2 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters