I wanna change "Author" to "Author_name" in my rails application.
So I have used "rename_column" method in the migration, then after running migration my column name is changed but after that I have to manually change it everywhere from my code ( Controller and view )
CodePudding user response:
It's not a question to Rails, but to your code editor. You just need to perform search and replace.
CodePudding user response:
So I have got my solution, This is a editor problem not a Rails one.
I'm using Vs-code, we can do Ctrl
Shift
H
.
It will open a search and replace window.
You can change whatever you wanna change,
Thank you.