Skip to content

Explicitly support connection adapters #1639

@scarroll32

Description

@scarroll32

Ransack should explicitly support Rails connection adapters, and these should be documented and supported with specs / CI.

Rails 7.1+ / 8.x

  • postgresql in active_record/connection_adapters/postgresql_adapter.rb
  • mysql2 in active_record/connection_adapters/mysql2_adapter.rb
  • trilogy in active_record/connection_adapters/trilogy_adapter.rb, uses mysql as the backend
  • sqlite3in active_record/connection_adapters/sqlite3_adapter.rb

Third-Party Extensions

These are not supported by the Ransack gem explicitly but are known to be generally compatible. Enhancements to Ransack to support these should be generalisable or else applied in the adapter gem.

Support for PostGIS

As noted in this open issue features from PostGIS are not supported, but it has been added to the codebase and CI as if the activerecord-postgis-adapter gem is added to a project, it overrides the extension name to PostGIS.

Some options are to change the else clause in this code to default to Postgres (hacky) or better to explicitly add all supported connection adapters by name and then allow an override with a Ransack config setting (preferred).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions