class Praxis::Extensions::AttributeFiltering::QuasiSqlLiteral
Helper class that can present an SqlLiteral string which we have already quoted … but! that can properly provide a “to_sym” that has the value unquoted This is necessary as (the latest AR code):
-
does not carry over “references” in joins if they are not SqlLiterals
-
but, at the same time, it indexes the references using the .to_sym value (which is really expected to be the normal string, without quotes)
If we pass a normal SqlLiteral, instead of our wrapper, without quoting the table, the current AR code will never quote it to form the SQL string, as it’s already a literal…so our “/” type separators as names won’t work without quoting.
Public Class Methods
Source
# File lib/praxis/extensions/attribute_filtering/active_record_filter_query_builder.rb, line 16 def initialize(quoted:, symbolized:) @symbolized = symbolized super(quoted) end
Calls superclass method
Public Instance Methods
Source
# File lib/praxis/extensions/attribute_filtering/active_record_filter_query_builder.rb, line 21 def to_sym @symbolized end