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.
2 parents 018812e + d8a35d6 commit 884b5b0Copy full SHA for 884b5b0
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] }
+ without_embedded = resource_class.reflect_on_all_associations.reject { |e| [:embeds_many, :embeds_one].include? e.macro }
7
+ poly, not_poly = without_embedded.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