From 3815aae2b9e4a5c5c3027a2ee8851f44b7c6a4da Mon Sep 17 00:00:00 2001 From: Daniel Colson Date: Fri, 21 Jun 2019 10:53:53 -0400 Subject: [PATCH] Append to paths instead of resetting them Using `+=` instead of `=` will ensure that the engine does not overwrite definition_file_paths set elsewhere --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 92800ed..820188a 100644 --- a/README.md +++ b/README.md @@ -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 ```