- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
基本上,当我登录时,我会尝试导航到 http://localhost:3000/users/edit只是为了检查我是否获得了编辑用户信息的表单,但我收到了这个错误:
app/views/devise/registrations/edit.html.erb:16: syntax error, unexpected ':', expecting ')' input_html: { autocomplete: "new-password ^
<h2>Edit <%= resource_name.to_s.humanize %></h2>
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<%= f.input :email, required: true, autofocus: true %>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
<% end %>
<%= f.input :password,
hint: "leave it blank if you don't want to change it",
required: false
input_html: { autocomplete: "new-password" } %>
<%= f.input :password_confirmation,
required: false,
input_html: { autocomplete: "new-password" } %>
<%= f.input :current_password,
hint: "we need your current password to confirm your changes",
required: true,
input_html: { autocomplete: "current-password" } %>
</div>
<div class="form-actions">
<%= f.button :submit, "Update" %>
</div>
<% end %>
<h3>Cancel my account</h3>
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
<%= link_to "Back", :back %>
我没有修改任何 View ,也没有生成任何用户 Controller 我正在使用 devise (4.5.0) 和 Rails 5.2.1 以及 Ruby ruby 2.4.4p296
感谢帮助
最佳答案
您缺少一个逗号,请将密码部分更改为我下面的内容
<%= f.input :password,
hint: "leave it blank if you don't want to change it",
required: false, <= this comma
input_html: { autocomplete: "new-password" } %>
关于ruby-on-rails - 设计 edit.html.erb View 中的语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52248822/
我有 Site {{$url}} 和 $(function(){ $('#pencil').click
我在每一行都有一个编辑按钮,我已经设置了 defaultColDef: { editable: false, } 在网格选项中 当我点击编辑按钮时,我希望该行处于编辑模式。如果我设置
我在每一行都有一个编辑按钮,我已经设置了 defaultColDef: { editable: false, } 在网格选项中 当我点击编辑按钮时,我希望该行处于编辑模式。如果我设置
我有一个 html 文件,我想编辑其中的字段。以下是我的 html 代码: ID GROUP NAME GROUP DESCRIPTION IS A
我希望管理员能够编辑普通用户无法编辑的字段。例如作者或订阅者等。 我试过这个:Django admin: How to display a field that is marked as editab
如何将PS文件中间的数据移动到Mainframe的左侧?有什么快捷命令吗? 我有一个数据集,第 13 列有数据,必须将其移动到第 11 列,任何短键都可以移动它。 想要将 DS 中的其余行作为第一行对
我在 div 中有一个可编辑元素,它本身是可点击的。每当我单击 x-editable anchor 元素时,单击会在 DOM 中冒泡并触发对父 div 的单击。我怎样才能防止这种情况发生?我知道可以使
我有一个类似这样的模型: class Product(models.Model): third_party_id = models.CharField(max_length=64, blank
我有一个包含 2 个可编辑文本字段的页面 {{creator.name}} Tell us about yourself in less than 100 words
这是我的架构: id: 'EntryCode', fields: { EntryCode: {editable: true, validation: {required: true}, nul
有人可以帮助确定这个问题 - http://jsfiddle.net/xBB5x/8823/ 我正在尝试实现 x-editable (bootstrap 2) typeahead 功能。 上面的 js
如果我使用例如 g_object_set (renderer, "background", "red", "background-set", FALSE, NULL); 对于文本渲染器, TreeVi
我在创建和编辑页面上都使用了 Angular 文件,但我想知道是否有办法阻止用户在/edit 页面上编辑 Geo Segment 的名称。 geo-region-detail.html: G
我正在尝试向 QListWidget 添加一个项目,选择该项目,然后开始编辑新项目。 该项目被添加,它被选中,但该行没有被引入 QLineEdit,或者它试图使用的任何东西。 这是我的小部件的代码,相
我有一个表格,其中的单元格和列中有多个值。当用户单击 TD 单元格上的任意位置时,我希望它: 成为文本区域 将当前文本粘贴到文本区域 在其下方放置一个取消按钮 一旦按下取消按钮,我希望一切都变回以前的
在我的程序中,会有一个机会编辑框,它可以更改“掉率”或“获胜率” 但我想将其更改为如果用户输入大于 100 的数字并点击编辑框,编辑框文本将变回 100。 我不知道如何实现这个。 最佳答案 看看下面的
我想创建我的编辑表单,以便它将当前用户信息简单地显示为文本,而不是在文本字段中,当用户单击文本时,它将变成文本字段,用户可以编辑他的信息。仅当用户单击提交按钮时,更改才会反射(reflect)在数据库
我有一个 QTreeWidgetItem 添加到 QTreeWidget: QTreeWidgetItem* item = new QTreeWidgetItem(ui->trwPairs); ite
我检查了最新的 Dropbox 和 Excel for iOS。在 Dropbox 中,我们有一个编辑按钮。单击它会打开 Excel 的扩展程序,您可以在其中编辑文件。 保存后,更改也会反射(refl
我目前正在使用pycord创建一个Python语言的不和谐机器人。我有一个发送消息的命令,其中嵌入了两个字段。一个名为Yes,值为0;另一个名为No,值也为0。在选择菜单中,我创建了两个选项。选项是和
我是一名优秀的程序员,十分优秀!