Reputation: 203
I'm currently working on my personal website. By adding devise gems to my code, I'va made a mistake.
I've written :
rails generate devise MODEL
and I want :
rails generate devise User
I know I could just start over, but I want to know first if it is possible to change this and if it is, how could I do that ?
Many thanks,
Raphaël.
Upvotes: 2
Views: 640
Reputation: 2727
Remove the table:
rake db:rollback VERSION=versionNumberOfMigration
Remove the configuration:
rails destroy devise:install
Remove your User model:
rails destroy devise MODEL
Check the references to devise in your routes.rb, controllers and views.
Also check for the following code snippets in your project:
devise_for
(routes.rb) before_action :authenticate_MODEL!
(controllers)MODEL_signed_in?
(controllers, views) current_MODELMODEL_session
(controllers, views)Upvotes: 4