Project

General

Profile

Refactor #33892

Feature #29991: Enable Zeitwerk autoload mode for Rails 6+

Refactor #33886: Fix early loads of constants

Postpone setting validations to to_prepare

Added by Ondřej Ezr 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Setting should be autoloaded constant and thus validations that are being defined on that class should be in to_prepare block

Associated revisions

Revision 2a663fa5 (diff)
Added by Ondřej Ezr 6 months ago

Fixes #33892 - add setting validations in to_prepare (#8911)

Setting validations need to be added on code reload.
Also this ensures the Validator classes are not loaded prematurelly.

Adds a class that holds all the validations to add them on reload.

History

#1 Updated by Ondřej Ezr 6 months ago

  • Subject changed from Postpone validations to to_prepare to Postpone setting validations to to_prepare

#2 Updated by The Foreman Bot 6 months ago

  • Assignee set to Ondřej Ezr
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8911 added

#3 Updated by The Foreman Bot 6 months ago

  • Fixed in Releases 3.2.0 added

#4 Updated by Ondřej Ezr 6 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF