我在dashboards.rb文件中为活动管理员创建了此部分。我需要将变量传递到部分,以便可以在 /admin的仪表板部分上渲染该数据。我需要在控制器或部分可以掌握的地方创建方程,并将其传递给部分。我在哪里可以在主动管理中做到这一点?

# == Render Partial Section
  # The block is rendered within the context of the view, so you can
  # easily render a partial rather than build content in ruby.
  #
    section "Month One Statistics" do
      div do
        render 'recent_graphs' # => this will render /app/views/admin/dashboard/_recent_posts.html.erb
       end
     end
有帮助吗?

解决方案

尝试Wiki,它具有很好的解释,以及其他 好东西 这里:

https://github.com/gregbell/active_admin/wiki/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top