I am creating an application with Rails on Windows 10.
Among them, it is divided into frameworks such as user and admin, and each controller and view directory exists under that directory.
Now, I want to change the directory name in the first hierarchy later. How can I change the directory name?Example
I want to change the name "seller" here.
rails g controller seller/controller name
At the beginning, I remember that an error occurred when I renamed directly by right-clicking, so please tell me the proper way!
Answer # 1
For view, you only need to modify the directory name, but for controller, that is not enough.
For example, suppose you change seller to shop
1 in conntrollers /shop/some_controller.rb
I think it's class Seller :: SomeCntrller
Change it to class Shop :: SomeController.
2 Change seller, sellers in routes.rb to shop, shops
- ruby on rails - when a photo is added to a folder on the pc, i want to display it on the browser of the web application!
- ruby on rails - i want to display all the images in the [rails] directory in the browser!
- ruby on rails 6 - i changed the project name of rails, but it became inaccessible
- ruby on rails - i want to resolve rails nameerror
- ruby on rails - i can't update rubygems
- ruby - about "activemodel :: unknownattributeerror" of rails
- ruby on rails 6 - rails6 activerecord :: recordinvalid in userscontroller # update
- ruby - [rails] i want to change the argument of link_to using conditional branching
- ruby on rails - i want to jump to the action of another controller with render
- ruby - rails causes activerecord :: recordnotfound and routing error at the same time
- ruby on rails - heroku: how to check the database_url used for regular backup
- ruby on rails 5 - i want to update the received parameters with nil
- ruby on rails - it is not saved in the database after registering the product
- ruby on rails - mvc rails
- ruby on rails - rails6 rspec model run-time error nomethoderror: undefined method `valid?'for nil: nilclass
- ruby - rails tutorial chapter 2 (6th edition)
- ruby on rails - saved description in nested controller
- ruby on rails - cart function routing error cannot be resolved
- ruby on rails - after installing devise on rails6, routing error occurs, so i want to eliminate it