我在 ActiveAdmin 中有一个名为统计的自定义页面,我想在其中显示包含数据库数据的图表。
现在我使用了Gon gem并希望通过实例变量将数据传递到我的自定义页面。
通常您会将 gon 线添加到索引操作中
class ProductsController < ApplicationController
def index
gon.rabl "app/views/products/index.json.rabl", as: "products"
end
end
但是我的自定义页面的活动管理员中没有控制器。我该怎么做?还是我必须通过仪表板执行此操作?