From 3995e62a280f94fae14ab6fc98a56f1b0d4fb1d0 Mon Sep 17 00:00:00 2001 From: Edu Depetris Date: Wed, 23 Feb 2022 11:37:01 +1300 Subject: [PATCH] Add custom Rails generator in README.md [ci skip] --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 786b34f..63f29c7 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,12 @@ Note that factory\_bot\_rails will only use this custom template if you are generating each factory in a separate file; it will have no effect if you are generating all of your factories in `test/factories.rb` or `spec/factories.rb`. +Factory\_bot\_rails will add a custom generator: + +```shell +rails generate factory_bot:model NAME [field:type field:type] [options] +``` + [default factory template]: https://github.com/thoughtbot/factory_bot_rails/tree/master/lib/generators/factory_bot/model/templates/factories.erb ## Contributing