【发布时间】:2014-07-08 04:27:36
【问题描述】:
我想为使用自定义集合的 formtasic 创建自定义输入
我的收藏被MyModule::Categories.all返回
我正在扩展 SelectInput
class CategoriesSelectInput < Formtastic::Inputs::SelectInput
def select_html
collection = MyModule::Categories.all
builder.select(input_name, collection, input_options, input_html_options)
end
结束
但格式似乎丢失了,我哪里出错了?
【问题讨论】:
标签: ruby-on-rails formtastic formbuilder