Skip to content

Fix Arel deprecations for Rails 6

Heinrich Lee Yu requested to merge 28497-fix-arel-deprecations into master

What does this MR do?

Strings passed to #order or #pluck are now required to be wrapped in Arel.sql. Some simple expressions like column names and functions with at most 1 argument are whitelisted in https://github.com/rails/rails/pull/36448 which will be in Rails 6 so I did not change these here.

This also fixes a deprecation regarding delegating arel methods automatically. Calling arel explicitly is now required.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #28497 (closed)

Edited by Heinrich Lee Yu

Merge request reports