我的主要问题如下: 以下是文件: routes.rb中:
| product_id | date | |
|------------|------------------------|-------|
| 260 | July, 21 2015 09:50:37 | 50000 |
| 270 | July, 23 2015 09:50:37 | 60000 |
test.html.erb
get 'service_action/test' => 'service_actions#show'
post 'service_action/test' => 'service_actions#test'
controller.rb:
<%= form_tag("/service_action/test", :method=>"post") do %>
<%= text_field_tag(:todo_text) %>
<%= select_tag(:ddl3, options_for_select([["Windows","1"],["RHEL","2"],["ALL","3"]]), class: 'form-control')%>
<%= submit_tag("Add todo", :class=>"btn") %>
<table data-toggle="table" id="instance_list" data-url="data.json" data-height="299" data-click-to-select="true" data-search="true">
<thead>
<tr>
<th data-field="state" data-checkbox="true" data-formatter="stateFormatter"></th>
<th data-field="Name">Machine Name</th>
<th data-field="DNS Name">DNS Name</th>
<th data-field="Server Type" data-align="">Server Type</th>
<th data-field="Platform" data-align="">Platform</th>
</tr>
</thead>
</table>
<% end %>
我的问题是:&#34;我可以在控制器方法中访问textfield(todo_text)和select_tag(ddl3)值,如您所见,但我无法从包含的表中访问所选值。它是一个表,我向用户显示一些信息,用户从该表中选择n行。从视图回到我的控制器方法,我也需要选定的行。&#34;
请帮我解决这个问题。