具有索引操作的自定义活动管理页面

Custom active admin page with index action

我正在使用 rails 3,我有一个名为 "current_details" 的自定义活动管理页面, 我在管理页面创建了控制器:

ActiveAdmin.register_page "Current Details" do

controller do

def index
  @milestones =  Milestone.all
  @collection =  @milestones.select{|a| a.milestone_status == false}
  @current_details = @collection.select{ |a| a.delivery_date.to_date.strftime('%m%Y') == Date.today.strftime('%m%Y') or a.delivery_date.to_date.strftime('%m%Y') < Date.today.strftime('%m%Y') }          
end
end

content only: :index do
   render 'index'
end
end

我需要这个索引操作,我如何获得它?

我已经尝试渲染部分,它抛出错误:缺少部分 admin/current_details/index。 我提到了 this
任何帮助将不胜感激。

确保你有 _index.html.erb 文件

views/admin/myname/_index.html.erb