【发布时间】:2016-10-06 12:28:29
【问题描述】:
我正在使用此代码:
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:
gem 'inherited_resources', github: 'activeadmin/inherited_resources'
gem 'activeadmin', github: 'activeadmin'
gem 'devise', github: 'plataformatec/devise'
我正在使用 Rails 5
【问题讨论】:
标签: ruby-on-rails rubygems activeadmin