I work Rails 4
with Devise
gem for User authentication, In my project also working fine with Devise
gem. But I want to remove the features of Sign up
and Forgot Password
modules.
For removing sign_up
, In config/routes.rb
file using skip
option like,
devise :users, :skip => :registration
It removes the sign_up module also truncated path generation
. This is fine.
But the same way, if I include this option for Forgot password
devise :users, :skip => :recover
or
devise :users, :skip => :recoverable
it won't work. I need to hide both modules in the same way of method.
How to achieve this? Thanks in advance..
I got the answer,
In Devise model
class remove the devise :registerable, :recoverable
option.
Also do the changes in devise/shared/_link.html.erb
by deleting the path generation
links of sign_up and forgot_password
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.