factory_bot_rails: Issues with custom error message translations
We have a model class in rails with the following validation:
validates :items, length: {
minimum: 1, message: I18n.t('items.one_required')
}
This works fine in version 5.0.1, but in 5.0.2 there’s a translation missing: en.items.one_required
in the errors collection. Not sure why factory_bot would affect the i18n class but it appears to.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 21
Commits related to this issue
- Set up reloading after_initialize Fixes #336 Before this commit, the initialization process looked something like this: Rails runs all of the initializers 1. Run the ["factory_bot.set_factory_paths... — committed to thoughtbot/factory_bot_rails by composerinteralia 5 years ago
- Set up reloading after_initialize Fixes #336 Before this commit, the initialization process looked like this: Rails runs all of the initializers 1. Run the ["factory_bot.set_factory_paths"][set_fac... — committed to thoughtbot/factory_bot_rails by composerinteralia 5 years ago
- Set up reloading after_initialize Fixes #336 Before this commit, the initialization process looked like this: Rails runs all of the initializers 1. Run the ["factory_bot.set_factory_paths"][set_fac... — committed to thoughtbot/factory_bot_rails by composerinteralia 5 years ago
- Set up reloading after_initialize Fixes #336 Before this commit, the initialization process looked like this: Rails runs all of the initializers 1. Run the ["factory_bot.set_factory_paths"][set_fac... — committed to thoughtbot/factory_bot_rails by composerinteralia 5 years ago
- Ensure factory_bot only loads after initialization Fixes #336 Alternate solution to #343 The initialization process looks like this: Rails runs all of the initializers 1. Run the ["factory_bot.set_... — committed to thoughtbot/factory_bot_rails by composerinteralia 5 years ago
- Set up reloading after_initialize Fixes #336 Before this commit, the initialization process looked like this: Rails runs all of the initializers 1. Run the ["factory_bot.set_factory_paths"][set_fac... — committed to thoughtbot/factory_bot_rails by composerinteralia 5 years ago
- Ensure factory_bot only loads after initialization Fixes #336 Alternate solution to #343 The initialization process looks like this: Rails runs all of the initializers 1. Run the ["factory_bot.set_... — committed to thoughtbot/factory_bot_rails by composerinteralia 5 years ago
- Ensure factory_bot only loads after initialization Fixes #336 Alternate solution to #343 The initialization process looks like this: Rails runs all of the initializers 1. Run the ["factory_bot.set_... — committed to thoughtbot/factory_bot_rails by composerinteralia 5 years ago
- Set up reloading after_initialize Alternate fix for #336. We went with #347 instead because the solution in this commit didn't work with Rails 4.2. Since we are no longer supporting Rails 4.2, I thin... — committed to thoughtbot/factory_bot_rails by composerinteralia 4 years ago
- Set up reloading after_initialize Alternate fix for #336. We went with #347 instead because the solution in this commit didn't work with Rails 4.2. Since we are no longer supporting Rails 4.2, I thin... — committed to thoughtbot/factory_bot_rails by composerinteralia 4 years ago
- Set up reloading after_initialize Alternate fix for #336. We went with #347 instead because the solution in this commit didn't work with Rails 4.2. Since we are no longer supporting Rails 4.2, I thin... — committed to thoughtbot/factory_bot_rails by composerinteralia 4 years ago
- Set up reloading after_initialize Alternate fix for #336. We went with #347 instead because the solution in this commit didn't work with Rails 4.2. Since we are no longer supporting Rails 4.2, I thin... — committed to thoughtbot/factory_bot_rails by composerinteralia 4 years ago
- Set up reloading after_initialize Alternate fix for #336. We went with #347 instead because the solution in this commit didn't work with Rails 4.2. Since we are no longer supporting Rails 4.2, I thin... — committed to thoughtbot/factory_bot_rails by composerinteralia 4 years ago
- Set up reloading after_initialize Alternate fix for #336. We went with #347 instead because the solution in this commit didn't work with Rails 4.2. Since we are no longer supporting Rails 4.2, I thin... — committed to thoughtbot/factory_bot_rails by composerinteralia 4 years ago
I have an idea about how to fix this. I will work on it a bit today and then either make a PR or post here what I have learned so far.