Ruby: how to uninstall Devise?

后端 未结 5 1331
广开言路
广开言路 2020-12-07 12:05

I have installed Devise and now want to remove it, including all the files it has generated. How do I do that?

5条回答
  •  醉话见心
    2020-12-07 13:07

    I found daemonsy's reply to be very helpful. Here are a few other things to consider as you do this.

    Replacing Devise

    1. If you are going to replace Devise with your own authentication, I recommend this Railscast: Authentication from Scratch (revised) (subscription required, but it's the best $9/mo you can spend).
    2. And this Railscast (no subscription required) can help with a forgot password link and "remember me" option (things Devise offers out of the box, but that you can build pretty easily yourself): Remember Me & Reset Password

    Tests

    1. Before you do this, I recommend running all your tests to make sure they're passing.
    2. After you remove Devise, your authentication-dependent tests will probably fail, so plan to spend some time fixing failing tests. This is a good thing because it will help you see what stuff "broke" when you removed Devise.
    3. Make sure you check your test helpers as well. Most of my helpers were in /spec/spec_helper.rb. In fact, most of my failing tests began passing once I updated the methods in spec_helper.rb (eg, "login_user").

提交回复
热议问题