Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用简单形式的 gem 来呈现我的表单。我正在尝试将输入字段类型设置为“数字”。此代码不起作用:
f.input :amount, input_html: { type: 'number' }
设置它的正确方法是什么?
以下应该工作
一种更清洁的方法是:
f.input :amount, as: :numeric
希望能帮助到你 !
最简单的方法:
f.input :whatever, as: :numeric
尝试:
f.input :amount, as: :integer
我有一个 jsp 文件 Trainer.jsp,其中有一个代码
$<f:loadBundle basename="kk.saken.jsf.starter.messages" var="msg" />
问题是“在类路径上找不到资源包 jsf.starter.messages”
当我运行 Trainer.jsp