Skip to content

Commit

Permalink
fix: Reliably quote columns/tables
Browse files Browse the repository at this point in the history
  • Loading branch information
bf4 committed Jan 31, 2023
1 parent 64520ca commit bfad51a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/jsonapi/active_relation_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -853,10 +853,20 @@ def alias_table_field(table, field, quoted = false)

def quote_table_name(table_name)
quote(table_name)
# if _model_class&.connection
# connection.quote(table_name)
# else
# quote(table_name)
# end
end

def quote_column_name(column_name)
quote(column_name)
# if _model_class&.connection
# connection.quote(column_name)
# else
# quote(column_name)
# end
end

def quote(field)
Expand Down

0 comments on commit bfad51a

Please sign in to comment.