【问题标题】:How to use ruby tags in placeholder: or value: [duplicate]如何在占位符中使用 ruby​​ 标签:或值:[重复]
【发布时间】:2016-08-19 15:32:36
【问题描述】:

我想知道如何在placeholder:value: 中使用<%= %> 标签 前任。 <%= f.email_field :email, placeholder: <insert code here>有人知道怎么做吗?

【问题讨论】:

标签: ruby-on-rails devise placeholder


【解决方案1】:

我已经为你回答了这个问题

Placeholder in Rails that will actually submit

只需添加一个值,它应该可以按您的意愿工作。下面的例子

<%= f.email_field, :email, value: current_user.email %>

【讨论】:

    猜你喜欢
    • 2013-07-10
    • 2019-05-13
    • 2014-07-13
    • 2013-08-07
    • 1970-01-01
    • 2020-12-27
    • 2020-01-30
    • 2015-03-16
    • 2019-05-22
    相关资源
    最近更新 更多