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
fix :restrict_with_error message #10787
Conversation
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:
|
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. |
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? |
Suppose
User has_many :posts
, klass on this context is Post, not User.We should call
human_attribute_name
with the owner.