Project

General

Profile

Actions

Patch #32911

closed

Rails 6: Fix deprecation warning "Class level methods will no longer inherit scoping"

Added by Pavel Rosický almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails support
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

fixes

DEPRECATION WARNING: Class level methods will no longer inherit scoping from `visible` in Rails 6.1.
 To continue using the scoped relation, pass it into the block directly. To instead access
 the full set of models, as Rails 6.1 will, use `GroupAnonymous.unscoped`, or `GroupAnonymous.default_scoped`
 if a model has default scopes. (called from block in project_ids_by_role at /redmine/app/models/user.rb:638)

(this change is backward compatible)


Files

unscoped.patch (1.29 KB) unscoped.patch Pavel Rosický, 2020-01-28 23:34

Related issues

Related to Redmine - Feature #29914: Migrate to Rails 6.1 with Zeitwerk autoloadingClosedGo MAEDA

Actions
Actions #1

Updated by Marius BĂLTEANU almost 5 years ago

  • Related to Feature #29914: Migrate to Rails 6.1 with Zeitwerk autoloading added
Actions #2

Updated by Go MAEDA almost 5 years ago

  • Category set to Rails support
  • Target version set to 4.2.0
Actions #4

Updated by Go MAEDA almost 5 years ago

  • Subject changed from Rails 6: Class level methods will no longer inherit scoping to Rails 6: Fix deprecation warning "Class level methods will no longer inherit scoping"
  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch. Thank you.

Actions

Also available in: Atom PDF