Reputation:
I want to show graph and charts in my app. For this I use charts in rails.
http://railscasts.com/episodes/223-charts
It works fine.I want to know is it possible I integrate it with active admin in rails?
Till now I can't done anything on its integration because I have no understanding how to start
Upvotes: 1
Views: 2088
Reputation: 572
You can render a partial in show or index page, as shown here.
ActiveAdmin.register Post do
show do
# renders app/views/admin/posts/_some_partial.html.erb
render 'some_partial', { post: post }
end
end
The partial can be plain old html/erb so you can include a <script>
section with the necessary javascript to render your chart.
Upvotes: 1