سؤال

I created this partial in the dashboards.rb file for Active Admin. I need to pass variables to the partial so it can render that data out on the dashboard section of /Admin. I need to create the equations in a controller, or somewhere where the partial can get at it, and pass them to the partial. Where can I do that in active 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
هل كانت مفيدة؟

المحلول

Try the wiki, it has a good explanation, as well as other goodies here:

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top