Skip to content

Conversation

tigrish
Copy link
Contributor

@tigrish tigrish commented Mar 4, 2012

Allows translations of activerecord.errors.messages.record_invalid to in errors.messages.record_invalid

…be looked up in errors.messages.record_invalid
@josevalim
Copy link
Contributor

Thanks for your contribution but could you please add a test with it?

@tigrish
Copy link
Contributor Author

tigrish commented Mar 5, 2012

OK, test added

@old_load_path, @old_backend = I18n.load_path.dup, I18n.backend
I18n.load_path.clear
I18n.backend = I18n::Backend::Simple.new
yield
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following two lines should likely be inside an ensure block. So if a test fail its state doesn't leak.

@tigrish
Copy link
Contributor Author

tigrish commented Mar 5, 2012

Good call, test tweaked.

josevalim added a commit that referenced this pull request Mar 5, 2012
Update I18n defaults for activerecord.errors.messages.record_invalid
@josevalim josevalim merged commit c5a47b3 into rails:master Mar 5, 2012
@josevalim
Copy link
Contributor

Merged, tks.

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.

2 participants