【发布时间】:2013-11-20 10:03:38
【问题描述】:
我正在显示一个表格,其中一列是一个下拉列表,它也改变了行的状态
for ex:
%table#bug.table
%thead
%tr
%th.span3 bug name
%th.span6 Comment
%th.span2 State
%th.span2 Manage
%tbody
- @bug.each do |ref|
%tr
%td= bug.name
%td= bug.comment
%td= bug.state
%td= select(bug.state_events)
上面,bug.state_events 在下拉列表中返回该错误的下一个可能状态。然后,用户可以更改状态(比如说从打开固定)。
在 haml/html 中实现此功能的最佳方法是什么?
PS: 我正在使用 Rails、haml、state_machine gems
【问题讨论】:
标签: html ruby-on-rails user-interface drop-down-menu haml