Reputation: 31
So, I have actually generated the views for devise but recently i want to change it back to another name, how will i?
Initially it was rails g devise 'Writer'... now, i want rails g devise 'User'
Thanks.
Upvotes: 0
Views: 329
Reputation: 31
Everything now works fine. I deleted the writer's column from the database and generated another one.
Upvotes: 0
Reputation: 781
if you cannot destroy your devise model then one method is to
rename occurrences of user_signed_in?, current_user, user_session (see devise helpers)
Rename your db table name (migration), modify your tests files, model and route to devise_for :users.
Upvotes: 0
Reputation: 1012
Destroy and then generate the model.
First:
rails destroy devise Writer
then:
rails generate devise User
It would be more easier and recommended then changing.
Upvotes: 1