rails 3 label i18n unexpected behavior
i want to translate a model attribute (post.name). in my view i have
label :post, :name
in my en.yml i have
en:
activerecord:
attributes:
post:
name: "Test"
it works only if i use it in the post-view, but in other views is does not (label-text is "Name" there). Is this intended behavior (this restr开发者_开发知识库iction is not mentioned in the docs), and can i do something about it?
A little late to the game here, just came across your question looking for an answer to another.
Here you go: label :post, :name, Post.human_attribute_name(:name)
精彩评论