0
votes

I have a collection of related models: A structure has_many residues and a residue has_many atoms. I've setup my ActiveAdmin using the belongs_to keyword, e.g.

ActiveAdmin.register Residue do                                                                       
    belongs_to :structure
end

I want to use ActiveAdmin as a way to filter down the entities in my database. For instance, on the Structures index page, I can filter my results on any of the column fields, let say I filter based on structure_name. I want to take this list of structures, and view all the related residues. Then, filter this list of residues, and view all the related atoms, etc.

From reading the ActiveAdmin documentation, it looks like I might be able to do something like this using the batch actions functionality (http://www.activeadmin.info/docs/9-batch-actions.html), but I can't seem to figure it out. Any pointers would be greatly appreciated.

1

1 Answers

0
votes

What are the relations between all your models?

Did you try to add more filters like this in your Index page?

# Examples:
filter :structure_residue_name, :as => :string, :label => "Residue Name"
filter :structure_residue_atom_name, :as => :string, :label => "Atom Name"