File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
app/services/forest_liana Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -104,14 +104,17 @@ def search_param
104104 end
105105 association_search = association_search . compact
106106 end
107+
107108 if @includes . include? association . to_sym
108109 resource = @resource . reflect_on_association ( association . to_sym )
109- resource . klass . columns . each do |column |
110- if !( column . respond_to? ( :array ) && column . array ) && text_type? ( column . type )
111- if @collection . search_fields . nil? || ( association_search &&
112- association_search . include? ( column . name ) )
113- conditions << association_search_condition ( resource . table_name ,
114- column . name )
110+ unless ( SchemaUtils . polymorphic? ( resource ) )
111+ resource . klass . columns . each do |column |
112+ if !( column . respond_to? ( :array ) && column . array ) && text_type? ( column . type )
113+ if @collection . search_fields . nil? || ( association_search &&
114+ association_search . include? ( column . name ) )
115+ conditions << association_search_condition ( resource . table_name ,
116+ column . name )
117+ end
115118 end
116119 end
117120 end
You can’t perform that action at this time.
0 commit comments