Skip to content

Instantly share code, notes, and snippets.

@fernandodev
Last active December 27, 2015 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fernandodev/7386051 to your computer and use it in GitHub Desktop.
Save fernandodev/7386051 to your computer and use it in GitHub Desktop.
How to create a simple custom filter for activeadmin when I have a relationship belongs_to
ActiveAdmin.register User do
filter :enterprise, collection: proc { Enterprise.all.map { |enterprise| [enterprise.name, enterprise.id] } }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment