We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 018812e commit 494e89eCopy full SHA for 494e89e
lib/active_admin/mongoid/filters/resource_extension.rb
@@ -3,7 +3,8 @@
3
module ActiveAdmin::Filters::ResourceExtension
4
def default_association_filters
5
if resource_class.respond_to?(:reflect_on_all_associations)
6
- poly, not_poly = resource_class.reflect_on_all_associations.partition{ |r| r.macro == :belongs_to && r.options[:polymorphic] }
+ filtered = resource_class.reflect_on_all_associations.reject { |e| [:embeds_many, :embeds_one].include? e.macro }
7
+ poly, not_poly = filtered.partition{ |r| r.macro == :belongs_to && r.options[:polymorphic] }
8
9
filters = poly.map(&:foreign_type) + not_poly.map(&:name)
10
filters.map &:to_sym
0 commit comments