当我请求重置密码时,我收到没有密码重置消息和链接的空白消息。我正在使用devise
这是我的密码控制器:
class PasswordsController < Devise::PasswordsController
def create
self.resource = resource_class.send_reset_password_instructions(resource_params)
respond_with({}, :location => after_sending_reset_password_instructions_path_for(resource_name))
end
end
注册管理员:
class RegistrationsController < Devise::RegistrationsController
def create
if verify_recaptcha
super
else
build_resource
clean_up_passwords(resource)
render :new
end
end
end
routes.rb中:
devise_for :users, controllers: { passwords: 'passwords' }
devise_for :users, :path_names=> {:sign_in=> "login", :sign_out=> "logout"},
:controllers => { :registrations => 'registrations' }