【发布时间】:2019-04-05 18:33:00
【问题描述】:
标题说明了一切,基本上我面对的是same problem as here,但我使用的是ActiveAdmin,我无法解决这个问题。
我已经尝试添加:
controller do
def update
if current_account.update_with_password(params[:account])
sign_in(current_account, :bypass => true)
flash[:notice] = 'Password updated.'
redirect_to account_path
else
render :action => :show
end
end
end
在 ActiveAdmin 注册页面,但没有工作。
我发现的其他解决方案是在设计配置文件中设置config.sign_in_after_reset_password = true,但我在初始化程序中看不到任何devise.rb 文件。我还在admin_user.rb模型文件中绑定了self.sign_in_after_reset_password = true,但是没有用。
【问题讨论】:
-
只是为了确认一下,您正在使用 Devise 并且在
config/initializers中没有devise.rb初始化程序?
标签: ruby-on-rails devise ruby-on-rails-5 activeadmin