How to reverse a 'rails generate'

前端 未结 17 1548
一个人的身影
一个人的身影 2020-12-02 03:10

I want to delete all the files it created and roll back any changes made, but not necessarily to the database, but more to the config files.

I\'d like to automatical

17条回答
  •  误落风尘
    2020-12-02 04:08

    If you prefer to delete the controller manually:

    For controller welcome

    rm app/controllers/welcome_controller.rb
    rm app/views/welcome
    rm test/controllers/welcome_controller_test.rb
    rm app/helpers/welcome_helper.rb
    rm test/helpers/welcome_helper_test.rb
    rm app/assets/javascripts/welcome.js.coffee
    rm app/assets/stylesheets/welcome.css.scss
    

提交回复
热议问题