Rails 活跃的管理员未定义的方法

Rails active admin undefined methods

我正在使用此代码:

ActiveAdmin.register_page "Dashboard" do

    section "Recent Posts" do 
        table_for Post.order("id desc").limit(15) do
            column :id
            column "Post title", :title do |post|   
                link_to post.title,[:admin,post]
            end
            column :category,sortable: :category
            column :created_at
        end
        strong (link_to "Show all posts")
    end
end

我得到这个错误:

undefined method `section'

如果我删除 'section' do-end 部分,那么我会得到以下错误:

undefined method `table_for'

等等...

好像我不能使用任何活动管理员给定的方法,也许我错过了什么?有 gem 之类的吗?我使用此设置安装了 active admin gem:

gem 'inherited_resources', github: 'activeadmin/inherited_resources'
gem 'activeadmin', github: 'activeadmin'
gem 'devise', github: 'plataformatec/devise'

我正在使用 rails 5

我成功地转换了我的代码,现在它编译没有任何错误。

ActiveAdmin.register_page "Dashboard" do
  content :title => proc{ I18n.t("active_admin.dashboard") } do
    columns do
      column do
        panel "Recent Posts" do
          table_for Post.order("id desc").limit(5) do
            column :name do |post|
              link_to post.title, [:admin, post]
            end
            column :created_at
          end
          strong (link_to "Show All Posts" , :posts )
        end
      end
    end
  end
end

我想我以前使用的语法是旧的并且不再受支持。