Patch #32911

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

Added by Pavel Rosický 2 months ago. Updated 2 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Rails support
Target version:4.2.0

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)

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


Related issues

Related to Redmine - Feature #29914: Migrate to Rails 6 New

Associated revisions

Revision 19490
Added by Go MAEDA 2 months ago

Rails 6: Fix deprecation warning "Class level methods will no longer inherit scoping" (#32911).

Patch by Pavel Rosický.

History

#1 Updated by Marius BALTEANU 2 months ago

#2 Updated by Go MAEDA 2 months ago

  • Category set to Rails support
  • Target version set to 4.2.0

#4 Updated by Go MAEDA 2 months 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.

Also available in: Atom PDF