Provide prefix filter method for queries

This commit is contained in:
Alexander Meindl 2020-05-12 10:50:50 +02:00
parent 9c134bc3fc
commit e6c1072fe7

View File

@ -4,6 +4,10 @@ module AdditionalsQuery
end
module InstanceMethods
def column_with_prefix?(prefix)
columns.detect { |c| c.name.to_s.start_with?("#{prefix}.") }.present?
end
def available_column_names(options = {})
names = available_columns.dup
names.flatten!