15854: Support filtering container_requests by container fields.
[arvados.git] / services / api / app / models / arvados_model.rb
index 8c8ad8e254467cadbb5874c3f7519a574ccfe21c..946c4262e3a0eeeb1297cf51f1fba9ab183a1d96 100644 (file)
@@ -422,7 +422,7 @@ class ArvadosModel < ApplicationRecord
   end
 
   def logged_attributes
-    attributes.except(*Rails.configuration.AuditLogs.UnloggedAttributes)
+    attributes.except(*Rails.configuration.AuditLogs.UnloggedAttributes.keys)
   end
 
   def self.full_text_searchable_columns
@@ -457,6 +457,9 @@ class ArvadosModel < ApplicationRecord
     if not ft[:cond_out].any?
       return query
     end
+    ft[:joins].each do |t|
+      query = query.joins(t)
+    end
     query.where('(' + ft[:cond_out].join(') AND (') + ')',
                           *ft[:param_out])
   end