mirror of
https://github.com/thoughtbot/factory_bot_rails.git
synced 2022-11-09 11:49:18 -05:00
Append to paths instead of resetting them
Using `+=` instead of `=` will ensure that the engine does not overwrite definition_file_paths set elsewhere
This commit is contained in:
parent
7e44401667
commit
3815aae2b9
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ rescue LoadError
|
|||
end
|
||||
|
||||
class MyEngine < ::Rails::Engine
|
||||
config.factory_bot.definition_file_paths =
|
||||
config.factory_bot.definition_file_paths +=
|
||||
[File.expand_path('../factories', __FILE__)] if defined?(FactoryBotRails)
|
||||
end
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue