Skip to content

Instantly share code, notes, and snippets.

@qichunren
Last active March 29, 2022 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qichunren/fce3f9e3b49686f976114771f476005f to your computer and use it in GitHub Desktop.
Save qichunren/fce3f9e3b49686f976114771f476005f to your computer and use it in GitHub Desktop.
Rails CRUD boy

Generate admin model CRUD code

This is unexpected, as it geneated post model into admin namespace.

./bin/rails generate admin/post title context:text

Solution:

./bin/rails generate model Post title context:text
./bin/rails g scaffold_controller Admin::Post title context:text --model-name=Post  --no-jbuilder

Issue fixed

rails/rails#44662

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment