2
我有一个模型page.rb和模型comment.rb和评论belongs_to的页面。 还我使用的宝石主动管理。在索引页我有一个搜索表单的“过滤器”时,我有主动管理过滤
filter :country
filter :city
filter :category
filter :description_type
filter :title
filter :sight_of_the_day, :as => :select
filter :active, :as => :select
filter :show_in_top, :as => :select
filter :created_at
filter :updated_at
它工作正常,但我希望有更多的1个过滤器。我想打一个名为“意见”复选框,如果它被选中,我只想要查找其有意见的网页。我如何在活动管理员中执行此操作?提前致谢!
非常非常好的! – RubyFanatic 2012-08-29 19:12:57
在最新ActiveAdmin,整合检索已被替换洗劫所以你需要使用'的ransacker'代替'search_method'。下面是一个[示例](https://github.com/ernie/ransack/blob/master/spec/support/schema.rb#L18)。 – manafire 2013-07-12 20:08:44