Note to self:
Remove devise_for in routes.rb if you’re trying to generate a scaffold of an already existing model.
Steps to replicate:
- rails g model Foo name
- rails g devise Foo
- rails g scaffold Foo –skip
-
This would result with the error: The name ‘Foo’ is either already used in your application or reserved by Ruby on Rails. Please choose an alternative and run this generator again.
-
Commenting the devise_for line in routes.rb will allow you to proceed with the scaffold.