Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/jsonapi/active_relation_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ def alias_table_field(table, field, quoted = false)
end

def quote(field)
"\"#{field.to_s}\""
ActiveRecord::Base.connection.quote_table_name(field)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you write a test for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was an existing open mr that added mysql to the CI workflow. That was opened to cover the same case as this fix.

Would that mr be enough of a test-case
https://github.com/cerebris/jsonapi-resources/pull/1370

end

def apply_filters(records, filters, options = {})
Expand Down