我尝试从我网站上的管理员帐户保存用户的数据,但是我收到的错误是当前密码在表单提交后无法为空。以下是我使用的表格:
= form_for @user, url: { action: 'update', controller: 'devise/registrations'}, method: :put do |f|
如果它没有首先验证用户,它将成功运行。
答案 0 :(得分:0)
you can use this in application_controller.rb
as its mention in devise
doc
protected
def configure_permitted_parameters
devise_parameter_sanitizer.permit(:sign_up, keys: [:name, :role, :email, :password])
devise_parameter_sanitizer.permit(:account_update, keys: [:email,:#foo, :bar])
end
you can modify your column name for signup and update action for devise.