Split Active Admin index into two tables/panels based on a field
I want to do something like this:
ActiveAdmin.register Split do
index do
panel "Cute" do
if cute?
column :blah
default_actions
end
end
panel "Not so cute" do
if not cute?
column :toot
default_actions
end
end
end
end
Where there's the Cute table which lists all the objects which cute? is
true and then there's the Not so cute table where cute? is false.
The problem is that I can't figure out how to split it into two different
tables/panels. I'm getting the following error:
undefined method `column' for <div
class="index_as_table"></div>
:ActiveAdmin::Views::IndexAsTable
Which leads me to believe I shouldn't be using panel above column. I
searched through the ActiveAdmin docs and couldn't find anything about
splitting the index table view into two tables
No comments:
Post a Comment