我有两个关于simple_form rails gem的问题。rails simple_form位掩码属性
1.
是否有更好的方法来自动转换从输入集合模型静态数组?
OPTIONS = [:val1,:val2,:val3] #constant from my model:
#for now i'm doing this:
f.collection_radio :model_attribute, MyModel::OPTIONS .collect { |o| [t(o, :scope=>[:activerecord, :attributes, :MyModel]), "#{o}"] }, :last, :first %>
我怎么能显示与掩码属性复选框? (布鲁斯位掩码)