我想把它变成Rails form_for
:
<input type="text" class="auto" data-a-sign="$ ">
我目前正在使用HAML,我的代码如下所示:
= form_for @foto,:url => products_path, :html => { :multipart => true } do |f|
%p
= f.label :price
= f.text_field :price
%p.button
= f.submit
答案 0 :(得分:1)
我以为我刚才回答了同样的问题。无论如何,我的回答是:
= text_field_tag "currency", nil, class: "auto", data: { a_sign: "$ " }