【发布时间】:2016-07-09 22:52:26
【问题描述】:
我的观点如下:
<%= select_tag(:option_id, options_for_select([
['Students', 1],
['Teachers', 2],
])) %>
如何在视图本身中检索选定的值?我想根据它动态改变<%= link_to %>的值。
这是我的部分咖啡脚本:
jQuery ->
$('#import_type').change ->
我现在如何更改<%= link_to %> 的值?
【问题讨论】: