【发布时间】:2014-07-04 09:50:41
【问题描述】:
在我看来,我有这个带有选择功能的表单:
<form id="form_id">
<%= form.select('id','name', @document.informations.find(:all).collect {|u| [u.name] },
options={},{:onChange => 'submit()'}) -%>
</form>
如何在视图的其余部分使用所选名称?
我在其他主题中看到了这一点:
$('#id_name').val();
但它对我不起作用,它说:
`$(' is not allowed as a global variable name
【问题讨论】:
标签: ruby-on-rails forms select