gpt4 book ai didi

ruby-on-rails - 停止 Devise 的当前密码要求

转载 作者:数据小太阳 更新时间:2023-10-29 07:26:10 24 4
gpt4 key购买 nike

我的网站的编辑用户部分有问题。出于某种原因,我在尝试编辑用户时不断收到错误“当前密码不能为空”。我们使用 devise 来管理用户,但我似乎无法在任何地方找到会产生此错误的代码。

表单代码如下:

- semantic_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |form|
= devise_error_messages!
= form.semantic_errors
= form.input :first
= form.input :last
= form.input :birth_year, as: :select, collection: User.birth_range.to_a.reverse
%i= t('users.edit.cast_biometrics_hint')
= form.input :gender, as: :select, collection: gender_options, include_blank: false
= form.input :eye_color, as: :select, collection: eye_color_options, required: false
= form.input :hair_color, as: :select, collection: hair_color_options, required: false
= form.input :ethnicity, as: :select, collection: ethnicity_options, required: false
%li.select.optional#user_height_input
%label{for: 'user_height'} Height
%select#user_height_ft{name: 'user[height_ft]'}
= options_for_select 0..9, resource.height_ft
%span ft  
%select#user_height_in{name: 'user[height_in]'}
= options_for_select 0..11, resource.height_in
%span in
= form.buttons

最佳答案

关于ruby-on-rails - 停止 Devise 的当前密码要求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9779199/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com