简体   繁体   中英

How do I make these changes to my directory from the command line? (RoR)

Currently our post resources are nested under topics. We should organize our posts_controller and post views in the same manner. Make the following directory changes: Try to make these changes from your command line.

app/controllers/posts_controller.rb -> app/controllers/topics/posts_controller.rb

How do I make the changes using the command line?

$ mkdir app/controllers/topics
$ mv app/controllers/posts_controller.rb app/controllers/topics/posts_controller.rb

Generically, you'd want to use mkdir -p in case app/controllers/topics exists already.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM