Provide prefix filter method for queries
This commit is contained in:
parent
9c134bc3fc
commit
e6c1072fe7
@ -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!
|
||||
|
Loading…
Reference in New Issue
Block a user