我使用X-Editable来更改布尔值。目前,下拉列表提供了两个选项,"是"并且"不"但是我想将其更改为" Active"和"无效"。
<%= editable user, :active %>
我试图添加这样的选项:
<%= editable user, :active, [['Active', true], ['Inactive', false]] %>
然而,抛出以下NoMethodError:
undefined method `each_pair' for [["Active", true], ["Inactive", false]]:Array
Did you mean? each_slice