Dangerous query method deprecation warning on Rails 5.2.3
问题 I am in the process of upgrading my Rails app to 5.2.3 I am using the following code in my app. MyModel.order('LOWER(name) ASC') It raises the following deprecation warning: DEPRECATION WARNING: Dangerous query method (method whose arguments are used as raw SQL) called with non-attribute argument(s): "LOWER(name)". Non-attribute arguments will be disallowed in Rails 6.0. This method should not be called with user-provided values, such as request parameters or model attributes. Known-safe