jackc / jackc/edge

Rails 6 Deprecation Warning from Rails 5.2

Open
#22 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
90
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Hello, using this gem I get this error when loading models
```
Dangerous query method (method whose arguments are used as raw SQL) called with non-attribute argument(s): "\"module_elements\".\"position\" DESC". 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 values can be passed by wrapping them in Arel.sql().
```

Thanks for all of the hard work on this gem, I dream of this functionality being baked into Rails.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no file or test; start by locating the model-loading query that emits the Rails deprecation warning for "module_elements"."position" DESC. Compare its behavior across Rails 5.2 and Rails 6, and verify that the warning is no longer emitted when the gem loads models.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.