GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Suppose User has_many :posts, klass on this context is Post, not User.
We should call human_attribute_name with the owner.
User has_many :posts
Do we have any test case related to this? If not, I'd recommend adding one. Thanks.
@kuboon ping, did you have time to add the test-case?
It's been three months since we last heard from you. I'm closing this but please report back if you are still interested in this change.
I'll retry with proper test cases soon.
I found the same problem. It seems others are facing this too, http://stackoverflow.com/questions/25079733/rails-internationalization-record-is-not-being-translated/25385812.
I can confirm that @kuboon solution fixes the problem.
As a workaround one can use:
entity: # Should be the parent class when bug https://github.com/rails/rails/pull/10787 is fixed
Probably must be fixed in has_one_association.rb too.
Thank you @guigs.
It's difficult for me to add test cases. I hope anyone to write them.
same problem on
I've just saw that the issue still happens in Rails 4.2.3
@kuboon @leonardofaria could you add a test-case to this PR to prevent against further regressions?
@senny I open a PR #21581 with the test cases for both has_many and has_one associations.