【发布时间】:2023-03-09 23:47:01
【问题描述】:
我正在使用带有 rails 4 应用程序的 ransack gem,并希望将引导类合并到 search_form_for 中。这是我的选择目前的样子。
<%= c.predicate_select ({only: [:cont, :not_cont, :eq, :not_eq, :blank, :null, :not_null]})%>
我也尝试过使用像这样的 html 选项传入第二个哈希(根据文档):
<%= c.predicate_select ({only: [:cont, :not_cont, :eq, :not_eq, :blank, :null, :not_null]},{class=>'form-control'})%>
显然我做错了什么。 有人对如何正确地将类应用于 ransack predicate_select 有任何建议吗?
【问题讨论】:
标签: ruby-on-rails ransack