【发布时间】:2016-08-02 08:13:23
【问题描述】:
如何从选择标签中获取值以及如何在单击生成 pdf 时在 pdf 页面中显示该选定值。但是我用来选择的值来自不同的模型
<%= select_tag 'header',options_from_collection_for_select(@reciept_header, 'id', 'receipt_mainheader'), :include_blank => true %>
【问题讨论】:
-
@reciept_header 有单个或多个元素
-
这里需要使用 f.select 因为我在表单中使用 select 选项
标签: javascript html ruby-on-rails